![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
objective-c
maricoliu
这个作者很懒,什么都没留下…
展开
-
Objective-c中线程NSThread的使用
NSThread使用1.创建并启动线程 thread = [[NSThread alloc]initWithTarget:self selector:@selector(startMonitor) object:nil]; [thread start];2.停止线程 先向线程发送cancel消息,将线程标记为停止,然后在合适的地方原创 2013-09-27 16:36:03 · 779 阅读 · 0 评论 -
objective-c中调用shell命令
NSTask *task; task = [[NSTask alloc] init]; [task setLaunchPath: @"/bin/ls"]; NSArray *arguments; arguments = [NSArray arrayWithObjects: @"-l", @"-a", @"-t", nil]; [task setArgume原创 2013-09-27 15:53:57 · 2847 阅读 · 1 评论