mar*_*aos 5 cocoa objective-c nslog
我在一个我知道被调用的方法中有一个NSLog调用(我设置了一个断点).但是在那种方法中没有输出,或者在该方法之后根本没有输出.当应用程序启动时,我的NSLog语句工作正常.我想知道这是否是某种线程问题.
NSLog在taskDidTerminate方法中停止,该方法是来自NSTask的回调:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(taskDidTerminate:)
name:NSTaskDidTerminateNotification
object:localTask];
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
编辑:taskDidTerminate
- (void) taskDidTerminate: (NSNotification *) notification
{
NSLog(@"TaskDid Terminate");
[task.delegate taskCompleted:task];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
443 次 |
| 最近记录: |