Linked Questions

123 votes
4 answers
100k views

How do I create a custom iOS view class and instantiate multiple copies of it (in IB)?

I am currently making an app that will have multiple timers, which are basically all the same. I want to create a custom class that uses all of the code for the timers as well as the layout/...
Michael Campsall's user avatar
82 votes
6 answers
65k views

Creating a reusable UIView with xib (and loading from storyboard)

OK, there are dozens of posts on StackOverflow about this, but none are particularly clear on the solution. I'd like to create a custom UIView with an accompanying xib file. The requirements are: No ...
Ken Chatfield's user avatar
6 votes
2 answers
9k views

Swift: Reusable UIView in storyboard and sizing constraints

I'm trying to create a reusable UIView in Swift that I can plug into my Storyboard view controllers. My key issue right now is that the reusable UIView "widget" doesn't fully fit into the UIView box ...
Uzumaki Naruto's user avatar
7 votes
4 answers
852 views

IBInspectable with Cocoa Touch Framework not working? (code attached)

I can not seem to get the "titleText" IBInspectable attribute working. I have a simple framework view with a UILabel which I create an IBInspectable variable "titleText". I note the inspectable "...
Greg's user avatar
  • 34.5k
6 votes
0 answers
912 views

IBDesignable Not Working on Large Xcode Project, Works on Proof-of-Concept

I'm working on a project with 100+ source files. I decided to implement a reusable custom view whose layout I can preview on Interface Builder, as described in this question and many others. However, ...
Nicolas Miari's user avatar
0 votes
1 answer
144 views

Swift: programmatically load/connect to controls created in Interface Builder

Say I have an OSX app with some sprites moving around, call them gremlins. When I click on a gremlin, I want to display some sliders that control some attributes of that gremlin, maybe scale, speed, ...
SaganRitual's user avatar
  • 3,183
0 votes
1 answer
109 views

Easiest way to copy a Collection View into a different Scene

I am building an iOS objective-c application with multiple scenes across the app. I have just finished building out one scene that features a collection view of images and details about those ...
Roger99's user avatar
  • 981
0 votes
1 answer
116 views

Custom UILabel not loading from xib

I have a CustomLabel view which is a sub-class of UILabel it self. Is there any possibility to set properties from Xcode Interface builder for this custom view. I have tried different things ...
Krish's user avatar
  • 3,890