How to set the title to the RadioButtons
I have create a radio group in the xib and mapped with IBOutlet. Now what i want to do is to set the title to the each radio button in the group.
i tried doing like this in ApplicationDidFinishL开发者_开发百科aunching method
NSArray *cells = [myRadio cells];
[[cells objectAtIndex:0] setTitle:@"First radio"]; and so on for 4 radio's.
Can anyone help me how to set the title for the radio button's dynamically.
First connect radioGroup
(IBOutlet
) to the NSMatrix
.
Next update the title like this:
[[radioGroup cellAtRow:0 column:0] setTitle:@"First Radio"];
[[radioGroup cellAtRow:1 column:0] setTitle:@"Second Radio"];
Or like this:
[[radioGroup cellWithTag:0] setTitle:@"Radio with tag zero"];
精彩评论