Tuesday, September 30, 2014

Better way to check empty string

//Check if we have any search terms in the search dictionary.
    if( (searchBar.text==(id) [NSNull null] || [searchBar.text length]==0 || searchBar.text isEqual:@""))
    {
         [AlertView showAlert:@"Please enter a search string"];

    }

No comments:

Post a Comment