ios - UIDocumentInteractionController works but doesn't show "Save Image" -
i create , present uidocumentinteractioncontroller
valid url saved image when present controller "save image" not appear.
nsurl *url = ...; self.interactioncontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:url]; [self.interactioncontroller presentoptionsmenufrombarbuttonitem:sender animated:yes];
i have verified self.interactioncontroller.uti
valid image type (jpeg)
______actual_______ vs.____expected_____
note* if knows better way format images please guest
in order have option save camera roll, app must have permission access photos.
relative alauthorizationstatus
([alassetslibrary authorizationstatus]
)
"save image" displayed for
alauthorizationstatusauthorized
alauthorizationstatusnotdetermined
"save image" not displayed for
alauthorizationstatusrestricted
alauthorizationstatusdenied
you can check this:
#import <assetslibrary/assetslibrary.h> - (bool)cansavetocameraroll { alauthorizationstatus status = [alassetslibrary authorizationstatus]; return (status = alauthorizationstatusauthorized || status == alauthorizationstatusnotdetermined); }
Comments
Post a Comment