ios7 - UIActivityViewController progress & result -
i using uiactivityviewcontroller save bunch of video assets user's camera roll, problem there no way know whether save photo library successful or not, , error code if unsuccessful. there way override default behavior of builtin activity? see completionhandler of uiactivityviewcontroller pretty useless in regard.
use completionblock
do.
alassetslibrary *lib = [[[alassetslibrary alloc] init] autorelease]; if ([lib videoatpathiscompatiblewithsavedphotosalbum:videourl]) { [lib writevideoatpathtosavedphotosalbum:videourl completionblock:^(nsurl *asseturl, nserror *error) { if (!error) { [self performselectoronmainthread: @selector(dismissalertview) withobject: nil, waituntildone:no]; } }]; } - (void)dismissalertview { //dismiss alertview here. }
Comments
Post a Comment