0
我在我的代码使用如何知道函数是否完成?
[NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(myfunc:) userInfo:text repeats:false];
。我如何知道myfunc
是否已完成运行,以便我可以获取它已更改的全局变量?
谢谢!
我在我的代码使用如何知道函数是否完成?
[NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(myfunc:) userInfo:text repeats:false];
。我如何知道myfunc
是否已完成运行,以便我可以获取它已更改的全局变量?
谢谢!
您可以通过Cocoa的notification system通知调用者。
为什么函数不能通知收件人? – 2010-09-09 11:20:09