Skip to content

Instantly share code, notes, and snippets.

@emersonbroga
Created July 16, 2012 17:05
Show Gist options
  • Save emersonbroga/3123796 to your computer and use it in GitHub Desktop.
Save emersonbroga/3123796 to your computer and use it in GitHub Desktop.
Emerson Carvalho.com >> iOS 6: Integração do Twitter e Facebook (snippet 1)
//Primeiramente o texto inicial
NSString *textoInicialDoCompartilhamento = @"Foto Bacana"
//Imagem a ser compartilhada
UIImage *imagemASerCompartilhada = [UIImage imageNamed=@"foto.png"];
//Coloca os item em um array
NSArray *itensCompartilhados = @[textoInicialDoCompartilhamento, imagemASerCompartilhada];
//Cria o UIActivityViewController
UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems: itensCompartilhados applicationActivities: nil];
//Coloca o UIActivityViewController na tela
[self presentViewController: activity animated: YES completion: nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment