raginggoat
raginggoat

Reputation: 3600

Words Not Auto Capitalizing in UISearchBar

I have a search bar and I am trying to have words auto capitalize, like this:

- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar
{
    searchBar.showsCancelButton = YES;
    searchBar.autocapitalizationType = UITextAutocapitalizationTypeWords;
}

The shift key is highlighted by default when the keyboard comes up but it doesn't capitalize any words automatically. What am I doing wrong?

Upvotes: 11

Views: 3250

Answers (1)

Guilherme
Guilherme

Reputation: 7949

Capitalization is ignored when you use your hardware keyboard while testing with the simulator. Try in a device or use the Simulator's keyboard.

Upvotes: 10

Related Questions