I have 10 UIButtons and Single UILabel.All these UIButtons have Some Text as a title.Now i want when i click Some UIButton its title assign to UILabel and when we Click on Second UIButton its title also assign to UIlabel and append its with text of UILabel that it already have. Here is my code.
- (void)aMethod:(id)sender {
UIButton *button = (UIButton *)sender;
NSString *get = (NSString *)[[button titleLabel] text];
NSLog(@"my uibutton test= %@",get);
mainlabel.text=get;
}
Please any one guide me how can i Appened all these UIButtons Titles in Single UILabel.
You need to create a new string by appending them: