As the title, after I taken a photo with my iphone camera, how can I get the ALAsset
, which is the photo?
Asked
Active
Viewed 62 times
1 Answers
0
ALAssetsLibrary *al = [[ALAssetsLibrary alloc] init];
[al enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group, BOOL *stop)
{
[group enumerateAssetsUsingBlock:^(ALAsset *asset, NSUInteger index, BOOL *stop)
{
if (asset)
{
.. do something with the asset
}
}
];
}
failureBlock:^(NSError *error)
{
// User did not allow access to library
.. handle error
}
];

Bhadresh Mulsaniya
- 2,610
- 1
- 12
- 25
-
,thanks your reply,because I use camera to take a photo, how can I get that photo ? the first asset? or can I get the asset by lastly time? if can, how? – lme Jun 14 '16 at 06:56
-
-
Have you added this method ? - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info – Bhadresh Mulsaniya Jun 14 '16 at 07:01