ios - Get URLs value from the path of ALAsset Library -
i have nsmutablearray value of images.
<__nsarraym 0x14259390>(alasset - type:photo, urls:assets-library://asset/asset.jpg?id=6c7406fe-d0a8-4625-abba-1c2d758e0b54&ext=jpg)
now have assets-library://asset/asset.jpg?id=6c7406fe-d0a8-4625-abba-1c2d758e0b54&ext=jpg
url value string.and doing piece of code
(int = 0; < self.selectedphotos.count; i++) { nsstring *object = [self.selectedphotos objectatindex:i] ; nsarray *details = [object componentsseparatedbystring:@"urls"]; self.msg = [details lastobject]; }
but in details array getting error *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[alasset componentsseparatedbystring:]: unrecognized selector sent instance 0x1ba93f20'
can give me solution please how can url whole path. lot.
try inside loop:
alasset *object = [self.selectedphotos objectatindex:i] ; alassetrepresentation *rep = object.defaultrepresentation; self.msg = rep.url.absolutestring;
Comments
Post a Comment