Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sjarman

macrumors newbie
Original poster
Sep 24, 2008
18
0
Sydney, Australia
I've got a UITextField in my view and a UISearchBar.

I need to figure out a way to make everything that the user types into the TextField automatically appear in the SearchBar, as the user types it.

In other words, I want the SearchBar to mirror the text in the TextField letter by letter.

Anyone have any suggestions?
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
textField:shouldChangeCharactersInRange:replacementString:

It's a UITextFieldDelegate method.

Note that the replacement string isn't the string for the whole text rather just the character (so "searc" the replacement string would be "h" if someone types that...).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.