Skip to content

Instantly share code, notes, and snippets.

@kennylugo
Last active December 29, 2015 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennylugo/f8854dd5c9343d6eb750 to your computer and use it in GitHub Desktop.
Save kennylugo/f8854dd5c9343d6eb750 to your computer and use it in GitHub Desktop.
Control UI objects visibility - Used this code on UIPageViewController
//this goes right under the declaration of the class : @IBOutlet weak var getStartedButton:UIButton!
//CONTROL VISIBILITY OF BUTTON; WILL ONLY SHOW ON THE SIXTH VC (INDEX 6);
getStartedButton.hidden = (index == 6) ? false : true // Will hide from indexes 0 - 6
skipButton.hidden = (index == 6) ? true : false // Will show from indexes 0 - 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment