Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. @IBOutlet var botao: UIButton!
  2.  
  3. button.addTarget(self, action: "clicado:", forControlEvents: .TouchUpInside)
  4.  
  5. func clicado(sender : UIButton){
  6. // acha o titulo de acordo com a tag do botão clicado
  7. let feeling = properties.moods[sender.tag].first!
  8. // atribui o titulo achado ao botão do IBOutlet criado
  9. self.botao.setTitle(feeling.1, forState: .Normal)
  10. // fecha o picker
  11. self.closePicker()
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement