IBOutlet weak references


It appears that in the 5th edition of the book, none of the IBOutlets are marked as weak. This is in stark contrast to the earlier editions of the book where we were told that the top-level UIView (i.e., in a XIB) maintains strong references to the subviews, and therefore a UIViewController only needs weak references to subviews (such as UILabels).

Apple’s documentation still shows the pattern of using the weak keyword, and the earlier editions seemed so deliberate, so I’m curious, is there a reason behind the change?

This small point aside, I really appreciate your books, and I don’t think I would have landed my first job as an iOS developer without it, so thanks BNR!




Thanks for the link! Those reasons are compelling enough for me to make the switch, though I was aware that there was no issue with a retain cycle in the first place (just a matter of “best practice”). Still doesn’t answer the heart of my question—why the book made the change—but I suppose I would be fine with assuming that’s the reason behind it. Cheers!