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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -