Translate

2013年4月22日 星期一

UIActivityViewController googleplus

參考link

Shareing Example
NSString *shareString = @"CapTech is a great place to work."; UIImage *shareImage = [UIImage imageNamed:@"Icon.png"]; NSURL *shareUrl = [NSURL URLWithString:@"http://www.captechconsulting.com"]; NSArray *activityItems = [NSArray arrayWithObjects:shareString, shareImage, shareUrl, nil]; UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; activityViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:activityViewController animated:YES completion:nil]; [activityViewController setCompletionHandler:^(NSString *activityType, BOOL completed) { NSLog(@"Activity is %@", activityType); NSLog(@"Completed Status = %d", completed); if (completed) { } else { } }];

沒有留言:

張貼留言