Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @IBOutlet var botao: UIButton!
- button.addTarget(self, action: "clicado:", forControlEvents: .TouchUpInside)
- func clicado(sender : UIButton){
- // acha o titulo de acordo com a tag do botão clicado
- let feeling = properties.moods[sender.tag].first!
- // atribui o titulo achado ao botão do IBOutlet criado
- self.botao.setTitle(feeling.1, forState: .Normal)
- // fecha o picker
- self.closePicker()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement