To check a Button is Selected or UnSelected...
It perfect work when click on button as first time then got to Not Selected and after click on second time go to Selected.
-(IBAction)ClickBtn:(UIButton *)sender
{
sender.selected = ! sender.selected;
if (sender.selected)
{
NSLog(@" Not Selected");
}
else
{
NSLog(@" Selected");
}
}
No comments:
Post a Comment