There are 2 main ways to intercept a string: (URL format characters cannot be intercepted must be a special string to intercept)
Take out the URL of the picture
Nsurl *url=[info Objectforkey:uiimagepickercontrollerreferenceurl];
NSLog (@ "qqqq:%@", url);
Qqqq:assets-library://asset/asset. Jpg?id=3d3341a0-403d-488c-8c57-69573c779abd&ext=jpg
//Convert URL to string format to intercept
NSString *string = [[url absolutestring] stringbyreplacingpercentescapesusingencoding:nsutf8stringencoding];
1. Intercept from the beginning of a subscript to the end and from the beginning to a certain underlying self-string
Truncate a substring from one subscript to the end
NSString *STR1 = [string substringfromindex:36];
NSLog (@ "x≈%@", string);
X≈assets-library://asset/asset. Jpg?id=3d3341a0-403d-488c-8c57-69573c779abd&ext=jpg
2. Intercept a substring between two characters
Nsarray *array=[string componentsseparatedbystring:@ "="];
NSString *str1=array[1];
NSLog (@ "truncated string:%@", str1);
post-intercept string: 3d3341a0-403d-488c-8c57-69573c779abd&ext
Save pictures to local (write your own method)
[Self saveimage:image withname:str1];
URL format to string format and string interception