I have on n开发者_StackOverflowsstring object in which sometimes phone number gets stored and sometimes email address, i just need to ask that how to find any character suppose @ in a string, when email address is typed.
This is how you could check for @ as a substring
if ([string rangeOfString:@"@"].location == NSNotFound) {
// Number
} else {
// Email
}
精彩评论