码迷,mamicode.com
首页 > 其他好文 > 详细

UIActivityViewController

时间:2016-10-30 07:14:54      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:mat   div   log   popover   str   gen   line   animate   get   

    //UIImage *imageToShare = [UIImage imageNamed:@"iosshare.jpg"];
    //NSURL *urlToShare = [NSURL URLWithString:@"http://blog.csdn.net/hitwhylz"];
    NSString *textToShare = self.textView.text;
    NSArray *activityItems = @[textToShare];
    UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
    
    activity.excludedActivityTypes = @[UIActivityTypeAirDrop];//要忽略的内容
    
    /* //ipad使用
     UIPopoverPresentationController *popover = activity.popoverPresentationController;
    if (popover) {
        popover.sourceView = self.activityButton;
        popover.permittedArrowDirections = UIPopoverArrowDirectionUp;
    }
     */
    
    [self presentViewController:activity animated:YES completion:nil];

 

UIActivityViewController

标签:mat   div   log   popover   str   gen   line   animate   get   

原文地址:http://www.cnblogs.com/pengyunjing/p/6012331.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!