我目前认识到的UIImageWriteToSavedPhotosAlbum块主线程
UIImageWriteToSavedPhotosAlbum
块主线程第一函数调用约1 1/2秒,甚至于iPhone 4s/IPAD2。
我也尝试将其保存在这样一个单独的线程:
-(void) storeInBackground
{
NSAutoreleasePool *p = [NSAutoreleasePool new];
UIImageWriteToSavedPhotosAlbum(imageView.image, nil,nil,nil);
[p release];
}
....
//call
NSThread* thread1 = [[NSThread alloc] initWithTarget:self
selector:@selector(storeInBackground)
object:nil];
[thread1 setThreadPriority:0.1];
[thread1 start];
[thread1 release];
但尽管如此,一切阻挡。 之后,它曾经深入到相册,它的瞬间快速。
任何线索在这里做什么?
谢谢!
不,不,如我所说,放缓只发生在第一次通话。当我重做呼叫时,也调度一个新线程,但UI未被阻止。新线程的纯启动不会导致这些块。但是谢谢你。 – thedanielhanke 2011-12-20 09:05:41