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
On Mon, Jul 25, 2011 at 9:19 PM, Conrad Shultz
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 should also point out th
On Mon, Jul 25, 2011 at 10:29 PM, Howard Siegel 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 the UITextField
How do you prevent an NSTextField from accepting anything aside from
numbers? Or will I need to code up a solution to remove text from the
field automatically? Display a dialog & clear the contents?
Thanks,
Brooke
___
Cocoa-dev mailing list (Cocoa-dev@l
On Wed, Jan 21, 2009 at 11:07 AM, I. Savant wrote:
> See NSNumberFormatter.
Thanks for the RTFM.
It looks like you can no longer get an NSNumberFormatter from the
Views pane in Interface Builder & wire it up as was ( recent? )
convention. Is there still a way to do this? I'm not even sure how
On Wed, Jan 21, 2009 at 12:44 PM, Peter Hudson wrote:
> In IB in the Library panel, just below half way down there is a symbol
> on the left hand side which is a dollar sign ( and a calendar symbol
> next to it ) which is the number formatter. Click this and drag it
> to the text field - and d
On Wed, Jan 21, 2009 at 2:58 PM, Andy Lee wrote:
> 3.1.2. But Alex Kac just posted a relevant note... I had no idea IB was
> different for the iPhone/Touch.
>
> --Andy
The good news is I'm not a *complete* idiot, as it appears the option
just isn't there for the iPhone/iTouch.
Bad news is I *s
On Wed, Jan 21, 2009 at 3:04 PM, Alex Kac wrote:
> Check the Numbers only flag in the IB palette.
>
So my options are ( if I'm looking in the right place ) on the Text
Field Attributes tab on the inspector, Text Input Traits panel
Keyboard Type:
Default
ASCII Capable
On Wed, Jan 21, 2009 at 3:31 PM, Nick Zitzmann wrote:
>
> You could always attach the formatter manually, like this: (written in Mail,
> untested, use at your own risk, and all that)
>
> - (void)awakeFromNib
> {
>NSNumberFormatter *formatter = [[[NSNumberFormatter alloc] init]
> autoreleas
On Wed, 21 Jan 2009 14:56:34 -0600 Alex Kac wrote:
> Use the delegate I gave you and format it there. UITextField does not
> accept formatters. Look at the docs - all the answers are right there.
> Here is how I do it:
>
> Type in the class in the dev doc window. Set it to only show the
> iPhone O
Hello,
I'm trying to better acquainted with Cocoa and Obj-C, having some
trouble with simple things. Perhaps someone could kindly apply cluebat
to skull for me.
I'm accepting a couple of string values from a pair of NSTextField and
would like to take these values and do some math with them, then
11 matches
Mail list logo