coolk
coolk

Reputation: 353

Customize storyboards bundled inside iOS Framework file

I have a framework which has storyboard and xib files. How do I make the storyboards within the framework customizable? i.e. people using my framework should be able to modify the storyboards to customize the look & feel.

When I imported my framework in another app project in XCode, I did not see the storyboard files within my framework. How to make them visible & editable?

Is it even advisable to use framework in this case or should I go with static library+resource bundles combination?

Upvotes: 0

Views: 291

Answers (1)

coolk
coolk

Reputation: 353

I finally did this,

  • Load custom xibs,storyboards dynamically. i.e. first try loading custom storyboards, if not present load default storyboard(use try catch to check).
  • Expose all viewcontroller outlets and event handling functions through header files.
  • Make connections between buttons in your custom framework and these header file outlets,event handlers. Done! Your Viewcontroller.m functions will be called on clicking on those buttons.

Upvotes: 1

Related Questions