gpt4 book ai didi

objective-c - 为什么我的委托(delegate)不接受 performSelectorOnMainThread :withObject:waitUntilDone:?

转载 作者:太空狗 更新时间:2023-10-30 03:39:41 26 4
gpt4 key购买 nike

<分区>

Xcode 4 在 performSelectorOnMainThread:withObject:waitUntilDone: 消息上向我发出编译器警告,但我不明白。

我的委托(delegate)声明如下:

@property (nonatomic, assign) id <AccountFeedbackDelegate> delegate;

然后最终在主线程上执行:

[self.delegate performSelectorOnMainThread:@selector(didChangeCloudStatus) withObject:nil waitUntilDone:NO];

然而 Xcode 坚持给我:

warning: Semantic Issue: Method '-performSelectorOnMainThread:withObject:waitUntilDone:' not found (return type defaults to 'id')

当然,代码可以正常编译和运行,但我不喜欢这个警告。当我像这样重新声明委托(delegate)时,警告消失了,但我不喜欢解决方法:

@property (nonatomic, assign) NSObject <AccountFeedbackDelegate> *delegate;

我错过了什么?我做错什么了?干杯,
EP

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com