ios 去除UITextField中的空格

NSString *qName =[userNameText.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];

原文地址:https://www.cnblogs.com/lihaibo-Leao/p/3284887.html