首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

施用及关闭线程

2012-07-26 
使用及关闭线程-(void)startRtsp{//[self performSelectorInBackground:@selector(lanzado) withObject:ni

使用及关闭线程

-(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];    }    }

热点排行