UIButtonをtoggle表示できるようにする stackoverflowより 1 2 3 4 5 -(void)setState:(id)sender { UIButton* button = (UIButton*)sender; button.selected = !button.selected; } 複数のボタンから呼び出せるので便利 1 2 3 4 5 6 7 8 9 -(IBAction)tapAlphaButton:(id)sender { [self setState:sender]; } -(IBAction)tapBetaButton:(id)sender { [self setState:sender]; } URLs iphone - toggle UIButton-state when pressing, like a switch - Stack Overflow