Is it possible to create a cocoa touch framework in swift which contain storyboard and viewControllers?
If yes can you give me a reference to a guide or something to get started? all the examples i see of creating frameworks are very simple classes which don't involve ui
I want to create a framework which involve UI
Yes, that is possible.
All you have to do is to create a cocoa framework as you normally do from File > New > iOS - Cocoa Framework..
Since this involves UI, Click on the project and right click > New > iOS - Storyboard. And after that it is just as simple as you do it in a normal app. Once your stuff is over in the framework side, you gotta create a new project to test your framework with UI (make sure that the class created in fw is a public class ).
To load the storyboard of your framework instead of your sample project's storyboard, do the full in ViewWillAppear method.
And you'll have your framework's storyboard in your sample project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With