我的程序由 gcd 运行。
-(void) viewdidLoad {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH,0),
^ {
for(int i=0; i<screenshotNum ; i++)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString * url=[detailItem.mScreenshot objectAtIndex:i];
NSDictionary *args=[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:i], @"screenNum",
[NSString stringWithString:url],@"url",
nil];
[self loadImageScreenshot:args];
[pool release];
}
});
}
当我dismissModalViewController
.
当我触摸后退按钮时,我想退出这些后退线程。
-(void) BackButtonPressed:(id)sender
{
[self dismissModalViewControllerAnimated:YES];
}
如何添加代码?