How to distribute intended / verified custom views with Carthage

Is there a way to distribute a custom IBDesignable / IBInspectable UIView control in a pocket with Carthage?

Here's a demo structure:

https://github.com/exchangegroup/MyCustomView

It is designableMyCustomView

with a checkable property myBorderWidth

.

custom_class

The summary view is displayed in the storyboard of the frame project.

inspectable_works

But if I include this framework in another app with Carthage, the storyboard won't let me create MyCustomView

.

Here is a demo application that uses it with Carthage :

https://github.com/exchangegroup/UsingMyCustomView

inspectable_does_not_work

Is there a way to distribute an assignable UIView using carthage?

Tested in Xcode 6.4 and Xcode 7.

Carthage: 0.6.4

+3


source to share


1 answer


You can, but you need to include a package that is bundled in the main app that contains your assets (storyboard). If you want them to be able to drag and drop the uiview onto the storyboard, see your own design and / or edit it, which is a bit tricky. If your uiview overrides awakeafternib, you can design it in such a way that you can simply drag and drop them into storyboards and render completely without having to look at additional containers. I don't know how to edit the original view of the storyboard as if it were a template.



0


source







All Articles