开发者

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"]; 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜