第一步:开启子线程 //开启子线程到网络上获取数据 myFirstThread = [[NSThread alloc]initWithTarget:self selector:@selector(thread1GetData) object:nil]; [myFirstThread setName:@"第一个子线程,用于获取网络数据"]; [myFirstThread start]; 第二步:子线程的方法
第三步:结束子线程
|
iOS中使用子线程的完整方法
最新推荐文章于 2019-06-02 16:24:11 发布