If one creates in XCode, a UIViewController using ARC, the viewDidUnload: method is defined as follows:
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
If one then creates a button in the XIB, this code is inserted automatically at the top of the method:
[self setSomeButton:nil];
Is any of this code necessary at all with ARC?
This is not affected by ARC. You still have to set your strong IBOutlets to nil.
It is affected by iOS 6, though. But that’s under NDA, for now.