I am using a UIImagePicker to present the users photos so that the user can choose an image to be used in my app.
My problem is that on the first time a user opens t
Got it!
if ([ALAssetsLibrary authorizationStatus] == ALAuthorizationStatusNotDetermined) {
ALAssetsLibrary *assetsLibrary = [[ALAssetsLibrary alloc] init];
[assetsLibrary enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
if (*stop) {
// INSERT CODE TO PERFORM WHEN USER TAPS OK eg. :
return;
}
*stop = TRUE;
} failureBlock:^(NSError *error) {
// INSERT CODE TO PERFORM WHEN USER TAPS DONT ALLOW, eg. :
self.imagePickerController dismissViewControllerAnimated:YES completion:nil];
}];
}