#URLEncoding Usage import this category #import "NSString+URLEncoding.h" NSString *path = [@"http://...theCityName=北京" URLEncodedString];