1.转载
[NSThread detachNewThreadSelector:@selector(delTargetBook) toTarget:self withObject:nil];
-(void)delTargetBook
{
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];
//代码部分
//代码部分
//回主线程执行
[self performSelectorOnMainThread:@selector(didDelTargetBook) withObject:nil waitUntilDone:NO];
[pool release];
}
-(void)didDelTargetBook
{
[MBProgressHUD hideHUDForView:self animated:YES];
if ([delegate_ respondsToSelector:@selector(btnOfLibraryBookWasDelete:)]) {
[delegate_ btnOfLibraryBookWasDelete:self];
}
}