获取按钮的title

- (IBAction) btnPressed:(id)sender{
	NSString *title = [sender titleForState:UIControlStateNormal];
	NSString *newText = [[NSString alloc] initWithFormat:@"%@ button pressed.",title];
	statusText.text = newText;
	[newText release];
}
 

你可能感兴趣的:(ios,iPhone)