Reputation: 6347
Recently I stumbled across a post discussing how property outlets should be referenced when set up from a storyboard. The post is question stated that when setting a reference from a storyboard, that is ctrl-dragging the reference into the associated header, that the reference should be set as weak, since the storyboard already has a strong reference to the property.
Can anyone clarify this?
Upvotes: 0
Views: 75
Reputation: 104082
This is not true. It doesn't have anything to do with the storyboard having a reference. The outlets are usually set to weak, because they are references to UI elements that are subviews of some other view -- it's that view, the superview, that has the strong pointer (and ultimately, everything is a subview of the controller's self.view, and the controller has a strong pointer to it).
Upvotes: 2