8

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

orkenstein
  • 2,810
  • 3
  • 24
  • 45
  • I'm also noticing this issue, although there is one thing you should check. Double check that your IBDesignable files are added to both the 'buyer' and 'seller' targets. – Mike Cole Mar 01 '16 at 16:27
  • @MikeCole, no luck! The solution: move custom views to separate framework. – orkenstein Mar 01 '16 at 18:48
  • I was afraid of that. We have that approach working, but it seems like such overhead. – Mike Cole Mar 01 '16 at 19:44
  • @MikeCole, kind of. Forces to link lots of frameworks and pods with this Designables framework. But the build time decreased dramatically. – orkenstein Mar 02 '16 at 06:42

1 Answers1

1

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

orkenstein
  • 2,810
  • 3
  • 24
  • 45
  • Having the same issue, I also have multiple targets and currently trying to use a custom UIView from github. I drag the file to my project so that I can customize. I guess I should use Cocoapods – code4latte Oct 14 '16 at 18:52