Given the property declaration below, does method (A) work in exactly the same way as method (B)? I just want to check that self.yellowViewController = yellcon_New;
is going via my setter, so that the old objects gets released and the new one retained.
// INTERFACE
@property(nonatomic, retain) YellowViewController *yellowViewController;
// IMPLEMENTATION (A)
self.yellowViewController = yellcon_New;
// IMPLEMENTATION (B)
[self setYellowViewController:yellcon_New];
See Question&Answers more detail:os