Reputation: 4045
I have a simple application, in which there is a view controller which is inited with nib file. In this nib file I have a simple View who's parent class is a customUIView
subclass of UIView
. In this view there are some buttons which I want to access on my custom UIView
subclass methods when the setNeedDisplay
method is called. Is it good practice to create IBOutlets
for these buttons in both customUIView
and customUIViewcontroller
classes, or should I access these buttons by iterating on self.subviews
?
Upvotes: 0
Views: 186
Reputation: 1569
You should create the IBOutlets indeed... since this is the best way to acces these buttons properties.
Upvotes: 1