开发者

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

开发者 https://www.devze.com 2023-04-02 17:03 出处:网络
When compiling a project with ZipKit (https://bitbucket.org/kolpanic/zipkit/wiki/Home) with the latest iOS5, I see the following warnings:

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

精彩评论

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