iOS中的url,GET请求参数中有汉字
2018-02-27 本文已影响8人
风规自远
NSString * nameStr = [NSStringstringWithFormat:@"%@",self.name.text];
NSString * nameUrl = [nameStrstringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
self.url = [NSString stringWithFormat:@"%@",nameUrl];