- 创建线程后自动启动线程
[NSThread detachNewThreadSelector:@selector(run) toTarget:self withObject:nil];
- 隐式创建并启动线程
[self performSelectorInBackground:@selector(run)withObject:nil];
● 上述2种创建线程方式的优缺点
● 优点:简单快捷
● 缺点:无法对线程进行更详细的设置
[NSThread detachNewThreadSelector:@selector(run) toTarget:self withObject:nil];
[self performSelectorInBackground:@selector(run)withObject:nil];
● 上述2种创建线程方式的优缺点
● 优点:简单快捷
● 缺点:无法对线程进行更详细的设置