I have a UIView
inside a UIViewController
that I've created using the interface builder. I want to share and reuse that UIView
across my app. The UIView
will always have the same design and will only change its data.
What I already know:
I can build the
UIView
by code and re-add it to eachUIViewController
- not a solution for me, I want to create the UIView using the interface builder.I can use an external xib like suggested in this answer: https://stackoverflow.com/a/11444019/1578927 I tried it and it works great but I wonder, isn't there a better solution for reusing a
UIView
across my storyboard app? maybe without using a xib? I voted up on the solution above but it feels kinda hacky.
Thanks