开发者

ZipKit and iOS5 - synthesized vs. user defined setter/getter

When compiling a project with ZipKit (https://bitbucket.org/kolpanic/zipkit/wiki/Home) with the latest iOS5, I see the following warnings:

cannot pair a synthesized setter/getter with a user defined setter/getter

Any ideas ? The code in question is:

- (void) setInvoker:(id)i {
_invoker = i;
if (_invoke开发者_JAVA百科r) {
    irtsIsCancelled = [self.invoker respondsToSelector:@selector(isCancelled)];
} else {
    irtsIsCancelled = NO;
}

}


Not really related to iOS 5 so I'll answer.

Is the invoker @property declared with nonatomic? probably not.

In which case the runtime is generating an atomic getter while you have written a non-atomic setter. The compiler is warning you about that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜