iOS URL encode与decode 笔记

  • 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


你可能感兴趣的:(iOS URL encode与decode 笔记)