Created
July 16, 2012 17:05
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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