|ReleasedLast Release||Jun 2015|
Maintained by Evgenii Neumerzhitckii.
This demo shows how to distribute image assets with a dynamic framework.
The trick is to to provide the bundle of the framework when referencing the asset.
Here an the example code from the framework that shows an image with name “Ocean”:
let bundle = NSBundle(forClass: self) let image UIImage(named: "Ocean", inBundle: bundle, compatibleWithTraitCollection: nil)
There are two ways you can add this demo framework to your project.
Setup with Carthage (iOS 8+)
github "exchangegroup/AssetFrameworkDemo" ~> 1.0 to your Cartfile and run
Setup with CocoaPods (iOS 8+)
If you are using CocoaPods add this text to your Podfile and run
use_frameworks! pod 'ImageDemoLib', '~> 1.0'
Here is how you can get the image from the framework in your app:
import ImageDemoLib ... imageView.image = MyImage.getImage()