UITextField Questions

2011-07-25 Thread Brooke Gravitt
Hello, I have a question about UITextField - How might I restrict/correct user input that is numerical? For instance, I would like the input to only be numbers, and to have an upper bounds. If a user inputs any non-numerical input, I want to send a message to the UITextField to set itself

Re: UITextField Questions

2011-07-25 Thread Conrad Shultz
Take a look at UITextInputTraits to specify a numeric keyboard. (IIRC this can be done in IB too.) Take a look at UITextFieldDelegate's textFieldShouldEndEditing: method to perform validation of input. I should also point out that often a text field is not the most appropriate control for

Re: UITextField Questions

2011-07-25 Thread Brooke Gravitt
On Mon, Jul 25, 2011 at 9:19 PM, Conrad Shultz con...@synthetiqsolutions.com wrote: Take a look at UITextInputTraits to specify a numeric keyboard. (IIRC this can be done in IB too.) Take a look at UITextFieldDelegate's textFieldShouldEndEditing: method to perform validation of input. I

Re: UITextField Questions

2011-07-25 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/25/11 6:31 PM, Brooke Gravitt wrote: Thanks for the response! The fields in question are for setting a price and a percentage, respectively. They don't seem to fit into either category. I'll take a look at the UITextInputTraits the

Re: UITextField Questions

2011-07-25 Thread Howard Siegel
On Mon, Jul 25, 2011 at 18:31, Brooke Gravitt bro...@gravitt.org wrote: On Mon, Jul 25, 2011 at 9:19 PM, Conrad Shultz con...@synthetiqsolutions.com wrote: Take a look at UITextInputTraits to specify a numeric keyboard. (IIRC this can be done in IB too.) Take a look at

Re: UITextField Questions

2011-07-25 Thread Brooke Gravitt
On Mon, Jul 25, 2011 at 10:29 PM, Howard Siegel hsie...@gmail.com wrote: Brooke, You would likely be much better off using UIPickerViews, or a UIPickerView and a UISlider as Conrad suggests. If the UISlider doesn't give you enough selection precision, then use another UIPickerView. You use

Re: UITextField Questions

2011-07-25 Thread Howard Siegel
On Mon, Jul 25, 2011 at 19:43, Brooke Gravitt bro...@gravitt.org wrote: The Xcode banter has been interesting as well - count me as one of the folks who used ProjectBuilder/IB on NextStep and CodeWarrior MPW on the MacOS side. I still generally edit code in Vim, though. My flamewars have