-(void)segmentAction
{
if(segmentedControl.selectedSegmentIndex == 0)
{
textview.keyboardType = UIKeyboardTypeNumberPad;
}
else
{
textview.keyboardType = UIKeyboardTypeDefault;
}
}
views:
149answers:
1
A:
This is an objective C/iPhone question.
Is the function 'segmentAction' hooked up to the segmentedControl properly in Interface builder ? Make sure this gets called, for instance, on 'valueChanged' for segmented control, and it should change your keyboard.
Either segmentAction needs to be an IBAction or it needs to be called from one.
Make sure segmentedControl is properly hooked up, as an IBOutlet.
Also, where is 'textview' coming from. Your textView delegate functions return a variable called textview, if this is a member variable called textView things are going to get confusing quickly for you.
Tom Schulz
2010-06-16 19:08:55