objective c - Dynamically change the textview.keyboardType using segment control -
-(void)segmentaction { if(segmentedcontrol.selectedsegmentindex == 0) { textview.keyboardtype = uikeyboardtypenumberpad; } else { textview.keyboardtype = uikeyboardtypedefault; } }
this objective c/iphone question.
is function 'segmentaction' hooked segmentedcontrol in interface builder ? make sure gets called, instance, on 'valuechanged' segmented control, , should change keyboard.
either segmentaction needs ibaction or needs called one.
make sure segmentedcontrol hooked up, iboutlet.
also, 'textview' coming from. textview delegate functions return variable called textview, if member variable called textview things going confusing you.
Comments
Post a Comment