Skip to content

Instantly share code, notes, and snippets.

@maxehmookau
Last active August 29, 2015 14:24
Show Gist options
  • Save maxehmookau/fe7211682b923f49e14d to your computer and use it in GitHub Desktop.
Save maxehmookau/fe7211682b923f49e14d to your computer and use it in GitHub Desktop.
// ...
@property IBOutlet UIButton *button; // Connects the interface to the class. Can now alter the button with the button var.
- (void)disappear;
// ...
- (void)viewDidLoad { // We get this method for free on all view controllers.
//So when the view loads in to memory...
[_button addTarget:self action:@selector(disappear) forControlEvents:UIControlEventTouchUpInside];
}
- (void)disappear {
_button.visible = NO;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment