iOS URL encode与decode 笔记
2019-06-03 本文已影响0人
豪冷
- Encode:
NSString *url = @"http://haocold.com?location=中国";
[url stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet];
NSURL *URL = [NSURL URLWithString:url];
- Decode:
NSString *url = URL.absoluteString;
url = [url stringByRemovingPercentEncoding];
一款轻量级的布局框架,自动布局
https://github.com/xjh093/JHFrameLayout