Last active
July 29, 2020 17:41
-
-
Save peteranny/47852ad83897d9c69d70dd7c1195579a to your computer and use it in GitHub Desktop.
An example of a framework with assets. https://medium.com/better-programming/ios-build-your-cocoapods-framework-with-an-example-app-from-scratch-fd0f7bdf3f8c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorld { | |
let greet = "Hello" | |
public init() {} | |
public func hello(to whom: String) -> String { | |
return "\(greet) \(whom)" | |
} | |
public var helloColor: UIColor? { | |
if #available(iOS 11.0, *) { | |
return UIColor(named: "HelloColor", in: Bundle(for: HelloWorld.self), compatibleWith: nil) | |
} else { | |
return nil | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment