screen-capture

“Matheus, meu alerta não chama atenção o suficiente!”

Action sheet nele!

A action sheet é praticamente igual ao alert view, as unicas diferenças são a prensença do destructive button (botão vermelho), é indexada desde o “0″ e na hora de mostrar ao invés de [show alerta] é [alerta shoInView:self.view], fora isso não tem segredo!

Código amigo:

-(IBAction)botaoPressionado{

UIActionSheet *alerta = [[UIActionSheet alloc]initWithTitle:@”Minha primeira sheet!” delegate:self cancelButtonTitle:@”Cancelar” destructiveButtonTitle:@”Botao Vermelho” otherButtonTitles:@”Outros botões”,nil];

alerta.actionSheetStyle = UIActionSheetStyleBlackTranslucent;

[alerta showInView:self.view];

}

Download do arquivo

Share and Enjoy:
  • Print
  • Digg
  • Facebook
  • Google Bookmarks
  • email
  • PDF
  • RSS
  • Twitthis