我目前認識到的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