IBDesignable from External Framework?

后端 未结 4 1267
悲&欢浪女
悲&欢浪女 2020-12-29 07:44

I\'d like to create some custom views that use the @IBDesignable and @IBInspectable tags. I have added these to my Framework and then linked my Fra

4条回答
  •  别那么骄傲
    2020-12-29 08:08

    Alright, so apparently if you want to include @IBDesignable and @IBInspectable in a framework the framework has to either be:

    • Included WITHIN the consuming application, so the Framework will not be in it's own project. (i.e. adding a framework as a target by doing something like 'file -> new.. -> target -> framework' from consuming application).
    • Include the external framework as a CocoaPod in your consuming application. This actually adds the framework as a target rather than just linking the framework against the application.
      • There is a way to include local CocoaPods in a project, so don't worry you don't have to deploy your framework to the public just to do this.

提交回复
热议问题