我正在尝试更改不是发件人的按钮的图像,我试图将代码链接到按钮,但似乎不起作用我试图将 3 个按钮链接到 -(IBAction)Button1:(id)发件人;它仍然不起作用。
。H
-(IBAction)Button1:(id)sender;
-(IBAction)ButtonUn1:(id)sender;
-(IBAction)ButtonDef1:(id)sender;
.m
-(IBAction)Button1:(id)sender
{
UIImage *btnImage1 = [UIImage imageNamed:@"button_Not_At_all_R.png"];
[sender setImage:btnImage1 forState:UIControlStateNormal];
UIImage *btnImage2 = [UIImage imageNamed:@"Button_Unsure.png"];
UIImage *btnImage3 = [UIImage imageNamed:@"Button_Definitely.png"];
[ButtonUn1 setImage:btnImage2 forState:UIControlStateNormal];
[ButoonDef1 setImage:btnImage3 forState:UIControlStateNormal];
}
谢谢你的帮助。