记一手URL参数分离代码
NSString *scanResult = [scanResultQRcode stringByRemovingPercentEncoding];
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithString:scanResult];
NSArray *results = urlComponents.queryItems;
@interface NSURLQueryItem : NSObject <NSSecureCoding, NSCopying> {
@private
NSString *_name;
NSString *_value;
}
取数组中的NSURLQueryItem对象即可拿到想要的参数