I use Xcode 5 and have some code
@interface Controller {
__weak IBOutlet UIView *someView;
}
@implementation Controller {
- (void)doSomething
{
[UIView animateWithDuration:0.5 animations:^{
someView.hidden = YES;
}];
}
- (void)doSomething1
{
[UIView animateWithDuration:0.5 animations:^{
[self doSomething];
}];
}
Why the retain cycle warning not thrown there? Should I use weak references on self
every time I use self
in blocks?
Also I enabled Implicit retain of self within blocks
warning and it gave me 100 warnings with advice to write self->ivar.prop
(not ivar.prop
) in blocks. Should I do so after that warning is disabled by default?