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

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -