I have a view in a nib, which is linked to a property in my viewcontroller with the following line:
@property (unsafe_unretained, nonatomic) IBOutlet UIView *otherView;
It is unsafe_unretained because we are targeting ios 4 devices, but using ARC.
We are getting a crash because the otherView is being deallocated when we are trying to show it, and I'm not too sure why. I've put a breakpoint in viewWillAppear, and if I do "po otherView" in the debugger, i get:
<UIView: 0x6fcc880; frame = (0 0; 320 460); autoresize = RM+BM; layer = <CALayer: 0x6fcc8b0>>
I checked it at the end of the viewWillAppear method, and it is still there too. But then if I put a breakpoint at the beginning of viewDidAppear, I get:
0x6fcc880 does not appear to point to a valid object.
Can anyone point me in the right direction with this? If I change the property declaration to 'Strong', then this issue doesn't occur, and I understand that by changing it to Strong that I am retaining it (and therefore preventing it from being deallocated), but I don't think I should need to do this?
Regards, Nick