UIImageWriteToSavedPhotosAlbum saves only 5 image out of 10. Why?

后端 未结 2 454
温柔的废话
温柔的废话 2021-01-03 14:46

I have the problem as the title goes. Are there any restrictions, like \"Export only 3 image per second\", or something like?

        for (int frameStepper =         


        
2条回答
  •  时光取名叫无心
    2021-01-03 15:37

    A variation of this helped me: http://iphoneincubator.com/blog/tag/uiimagewritetosavedphotosalbum

    {
        UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
    
    }
    
    
    - (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
        if (error) {
            [self tryWriteAgain:image];
        }
    }
    
    -(void)tryWriteAgain:(UIImage *)image
    {
        UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
    }
    

提交回复
热议问题