读书人

施用及关闭线程

发布时间: 2012-07-26 12:01:08 作者: rapoo

使用及关闭线程

-(void)startRtsp{        //    [self performSelectorInBackground:@selector(lanzado) withObject:nil];    thread = [[NSThread alloc]initWithTarget:self selector:@selector(lanzado) object:nil];    [thread start];    }-(void)stopRtsp{    [session teardown];            [thread cancel];        if ([[NSThread currentThread] isCancelled]) {                                //clean up         [NSThread exit];    }    }

读书人网 >移动开发

热点推荐