-(void)gogo:(NSString *)str{
for (int i=0; i<100; i++) {
NSLog(@"thread in gogo-->%@",[NSThread currentThread]);
[NSThread sleepForTimeInterval:1.0f];
}
}
-(void)startGo{
NSThread *t1 = [[NSThread alloc]initWithTarget:self selector:@selector(gogo:) object:nil];
[t1 start];
NSLog(@"thread in startGo -->%@",[NSThread currentThread]);
thread线程已经start了,但是每次程序运行的时候都没有gogo这个方法里面的输出啊???
另外,当我换作[self performSelector之后,就可以看到在gogo中的循环输出了