I have two UIViews in the nib file and I set them to be properties of my view controller, using the IBOutlet
and weak
keyword.
However, when I use self.view1
which I want to use to point to the view in the nib, for the first time, it works. But when I use it later, these two properties turn to be nil
.
Using the strong
property would fix the issue. But I always use weak
for the IBOutlet
property. Why it becomes nil in this situation?