This is my first attempt to make an ios app.
I\'m using people picker to ask the user for a phone number, but when it retrieves with the code below, my NSStrin
You can use few methods of NSString and NSMutableString as :
NSString *phone=@"(0) 111192222-2222";
//I'm from Brazil and here the correct mask for mobile phone numbers is (01111) 92222-2222
NSMutableString *editPhone=[NSMutableString stringWithString:[phone stringByReplacingOccurrencesOfString:@")" withString:@""]];
editPhone=[NSMutableString stringWithString:[editPhone stringByReplacingOccurrencesOfString:@" " withString:@""]];
[editPhone insertString:@") " atIndex:6];
NSLog(@"%@",editPhone);//(01111) 92222-2222