Pergunta

How can i obtain the text of a UIButton in my

-(IBAction)clicked:(id)sender

method?

Thanks

Foi útil?

Solução

What about this:

- (IBAction)clicked:(id)sender {
  UIButton *button = (UIButton *)sender; 
  NSString *buttonTitle = button.currentTitle;
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top