|
6 years ago | |
---|---|---|
.. | ||
3rd-party-frameworks | 6 years ago | |
Demo-Samples | 6 years ago | |
SVGKitFrameworks | 6 years ago | |
SVGKitLibrary | 6 years ago | |
Source | 6 years ago | |
.gitignore | 6 years ago | |
.travis.yml | 6 years ago | |
CONTRIBUTING.md | 6 years ago | |
Cartfile | 6 years ago | |
Cartfile.resolved | 6 years ago | |
ISSUE_TEMPLATE | 6 years ago | |
LICENSE | 6 years ago | |
README.mdown | 6 years ago | |
SVGKit.podspec | 6 years ago |
SVGKit is a Cocoa framework for rendering SVG files natively: it's fast and powerful. Some additional info and links are on the wiki
We have a Twitter account http://twitter.com/SVGKit_free you can follow for release info, or tweet at for contact (any bugs, please report via the Issues page instead).
Latest info at: https://github.com/SVGKit/SVGKit/wiki/Versions
NB: April 2015: new Demo app, many more features, may have teething troubles with this one.
You have 3 main options for installing SVGKit:
NB: the "static library" is our backwards-compatible, manual install that always works if you have problems either with CocoaPods or with the Framework. But the other two are a lot quicker/easier.
NB: Frameworks are the preferred way to use libraries in Xcode. But this is a new feature, it might have bugs. If you have ANY problems, please create an Issue, but also try the Static Library method below
You MAY also need to manually add the following Apple Frameworks to your app:
You MAY also need to add the following 3rd party Frameworks to your app (included with SVGKit):
CocoaPods is a dependency manager for CocoaTouch. To do CocoaPods, adding the following in your podfile:
pod 'SVGKit'
It is also recommended that you setup your podfile to get SVGKit from this 2.x branch.
pod 'SVGKit', :git => 'https://github.com/SVGKit/SVGKit.git', :branch => '2.x'
Carthage is a decentralized dependency manager for Cocoa. To use Carthage, adding the following in your Cartfile:
github 'SVGKit/SVGKit'
It is also recommended that you setup your Cartfile to get SVGKit from this 2.x branch.
github "SVGKit/SVGKit" "2.x"
Until 2016, this was the PREFERRED way of shipping SVGKit.
We have a build script that automatically builds ALL versions of the library at once, and ships them as a single file: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4/3647187#3647187
It's all setup already, all you need to do is:
Everything else is automatic.
SVG add the support for macOS from SVGKit 2.1.0.
You can use nearly the same API like iOS. Including SVGKFastImageView
, SVGKLayeredImageView
, and you can use SVGKImage.NSImage
to export SVG layer to bitmap image.
We also provide a macOS demo for SVGKit. To run the Demo, open Demo-OSX.xcodeproj
and built to run. You can browser the different SVG files using those two different type of view to check the compatibility.
Here are some posts on using SVGKit, with advice on which methods to use and why:
CONTRIBUTING to the project, CORE ARCHITECTURE: http://t-machine.org/index.php/2012/12/31/svgkit-2013-development/
(November 2013): New (experimental) feature - writing SVG's out to disk, preserving any changes you made programmatically: http://t-machine.org/index.php/2013/11/17/svgkit-programmatic-editing-of-svg-files-on-ios/
If you get this error:
"+[NSCharacterSet SVGWhitespaceCharacterSet]: unrecognized selector sent to class "
... you're probably building the Static Library, but forgot to do the step below:
"Edit your build settings and add "Other Linker Flags" = "-ObjC""