I want to write code in UIButton2 method to check if UIButton1 sender is selected
else if (UIButton1sender.selected == YES) {
[UIButton2sender setImage:[UIImage imageNamed:@"52.png"] forState:UIControlStateNormal];
[audioPlayer play];
[self resumeTimer];
[self resumeLayer:self.view.layer];
So how do i write this UIButton1sender.selected.
Thanks for help.
You need to create two UIButton references in your viewController, initialize it at
viewDidLoad, assignIBActions and all the styles. Then in the button2IBActioncode you;ll be able to access the button1 variable like this:or if you have synthesized the property for it in this way:
Keep in mind, there’s yet one more property highlighted which you might want to use instead.