/ Published in: Objective C

Shows how to make a text field or UIButton visible or hidden in a method by passing a bool in you can make it hide or show the object just change states if its hidden it would show or if visible it would become hidden but I like to control that so it does what I want when I want.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
-(void)hideShow:(BOOL)YN{ Switch(YN) Case 0: Self.button.layer.hidden = YES; break; Case 1: Self.button.layer.hidden = NO; break; } //usage: [self hideShow:YES];//button is visible [self hideShow:NO];//button is hidden //text field outlets will work too like this Self.myTextFieldOutlet.hidden =YES;
Comments
