Quote:
Originally Posted by starwarsdevwookie59
This is great! Im having a problem though. Your method for making sure the next keyboard not have the decimal only works if you switch views. What if i have three text inputs on a page and only want one of them to have the decimal? How would you solve that?
Thanks!
|
I've updated the Example to solve this issue. Please check out my new site.
www.CocoaLines.com - Custom Number Pad
Code:
- (void)textFieldDidBeginEditing:(UITextField *)textField {
// We need to access the dot Button declared in the Delegate.
ExampleAppDelegate *appDelegate = (ExampleAppDelegate *)[[UIApplication sharedApplication] delegate];
// Only if we are editing within the Number Pad Text Field do we want the dot.
if (numericTextField.editing) {
// Show the Dot.
appDelegate.dot.hidden = NO;
} else {
// Otherwise, Hide the Dot.
appDelegate.dot.hidden = YES;
}
}
You could also do:
Code:
if ([numericTextField isFirstResponder])