Title of button in Iphone application Development : Button plays an very important roles in Iphone apps and sometimes you need to get the value of the title in your iphone apps .So here is simple code to get the value of Iphone apps .
NSString *titleOfButton = [sender titleForState:UIControlStateNormal];
complete function is described here
-(IBAction) clicked:(id)sender{ NSString *titleOfButton = [sender titleForState:UIControlStateNormal]; NSString *newLabelText = [[NSString alloc]initWithFormat:@"%@",titleOfButton]; labelsText.text = newLabelText; [newLabelText release]; }
Be the first to comment.