Guest User

Untitled

a guest
Oct 20th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. override func viewDidLoad(){
  2.  
  3. NotificationCenter.default.addObserver(self, selector: #selector(self.changeGiveaway(notification:)), name: Notification.Name("changeGiveaway"), object: nil)
  4.  
  5. }
  6.  
  7. func changeGiveaway(notification: Notification){
  8.  
  9. print("Change giveway was called")
  10.  
  11. homeShadow.isHidden = true
  12. yanaLiveVideoShadow.isHidden = true
  13. yanaChatShadow.isHidden = true
  14. yanaShopShadow.isHidden = true
  15. yanaProfileShadow.isHidden = true
  16. horoscopesShadow.isHidden = true
  17. fortuneTellerShadow.isHidden = true
  18. dailyGiveAwayShadow.isHidden = false
  19.  
  20.  
  21.  
  22. }
  23.  
  24. @IBAction func dailyGiveAway(_ sender: Any) {
  25.  
  26. NotificationCenter.default.post(name: Notification.Name("changeGiveaway"), object: nil)
  27. performSegue(withIdentifier: "giveAway", sender: self)
  28.  
  29. }
Add Comment
Please, Sign In to add comment