0

I tried to unhide a UIButton in an if-statement, like so:

if(condition)
{
  myButton.hidden = NO;
}

but this did not work. Xcode says, "Property 'hidden' not found on object of type '_strong id'". I am not sure what that means.

Does anyone know how it is done?

4

1 回答 1

1
 if(condition && [myButton isKindOfClass:[UIButton class]])
 {
      [((UIbutton *)myButton) setHidden:NO];
 }
于 2013-07-28T05:49:43.767 回答