NSString *Address = [placemark.addressDictionary objectForKey:@"FormattedAddressLines"];
NSLog(@"Address:%@", Address);
Address: ("Hooker Alley","San Francisco, CA 94108",USA)
我想从地址字符串中删除一些字符,例如 Hooker Alley, San Francisco, CA 94108,USA。怎么去掉这样的?请帮我
提前致谢
我试过这个:
NSString *removeCharacter = [Address stringByReplacingOccurrencesOfString:@"(" withString:@""];
但是错误出现在 First throw 调用堆栈中:
错误信息是,
-[__NSArrayM stringByReplacingOccurrencesOfString:withString:]: unrecognized selector sent to instance 0x81afd00