This isn’t another debate on brackets vs dot-notation. I noticed in Xcode that when I set outlets, Xcode automatically will set the pointers to nil in ViewDidUnload like so:
- (void)viewDidUnload
{
[self setScrollView:nil];
[self setEnergyLabel:nil];
[self setEnergyBar:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
Is there a reason why they use bracket notation instead of using dot-notation, like so?
- (void)viewDidUnload
{
self.scrollView = nil;
self.energyLabel = nil;
self.energyBar = nil;
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
There is no difference. I assume the latter is just easier for the script to generate from the class metadata.