Search code examples
iosinterface-builderswift2xcode7ibdesignable

IBDesignable and multiple targets in Swift


Seems like IBDesignable has some problems with multiple targets and swift modules. After I've added new target (my app has 2 targets now, e.g. seller and buyer), my StoryBoard began to halt views building with warning:

Storyboard: warning: IB Designables: Using class UITextField for object with  
custom class because the class _TtC15******Buyer11HCTextField does not exist

I think, designables compiler fails to find proper *swift** module somehow.
Any suggestions how to fix this?

Pic:

enter image description here

I'm using Xcode 7.0.1 and Swift2


Solution

  • The final solution is... Create a framework! It solves all the problem. Just keep your designables in separate bundle.