//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的更多相关文章

  1. UIActivityViewController 系统社交化 共享

    1.UIActivityViewController是继承自UIViewController,是拥有VC的特性 a.初始化 init  , initWithActivityItems:applicat ...

  2. 简单跳转到微信分享,基于libWeiChatSDK 和简单的自定义UIActivityViewController

    一.自定义UIActivity: 如果想要自定义UIActivity必须知道UIActivityViewController.首先这个类主要是用于接受字符串,RUL类型和图片类型的数据用于分享和操作的 ...

  3. Add sharing to your app via UIActivityViewController

    http://www.codingexplorer.com/add-sharing-to-your-app-via-uiactivityviewcontroller/ April 4, 2014 Ev ...

  4. UIActivityViewController(转)

    在iOS 6之后提供了一个分享列表视图,它通过UIActivityViewController管理.苹果设计它主要的目的是替换分享动作选单(ActionSheet),分享动作选单是出于分享目的的动作选 ...

  5. iOS - UIActivityViewController

    前言 NS_CLASS_AVAILABLE_IOS(6_0) __TVOS_PROHIBITED @interface UIActivityViewController : UIViewControl ...

  6. UIActivityViewController 自定义选项

    UIActivityViewController 自定义选项 重写 UIActivity 类 建议下载github上源码学习一下 https://github.com/samvermette/SVWe ...

  7. IOS 7 Study - UIActivityViewController(Presenting Sharing Options)

    You want to be able to allow your users to share content inside your apps with theirfriends, through ...

  8. 研究 UIActivityViewController

    研究 UIActivityViewController 发布于:2014-04-25 09:51阅读数:5903 特定的编程语言,如 Lisp.lo 和 Mathematica 都是同像性的(homo ...

  9. iOS 6分享列表——UIActivityViewController详解

    iOS 6分享列表——UIActivityViewController详解 2013-06-03 01:42:33     发表评论 在iOS 6之后提供了一个分享列表视图,它通过UIActivity ...

  10. 仿简书分享:UIActivityViewController系统原生分享

    接下来介绍UIActivityViewController: 1. 创建要分享的数据内容,加在一个数组 ActivityItems里. NSString *textToShare = @"我 ...

随机推荐

  1. Forward Proxy vs Reverse Proxy

    Overview We've talked about reverse proxy servers and how they can really be good at protecting the ...

  2. 如何自定义echarts 线性图的选择事件

    最近在做公司的数据大盘,要用到图表显示,echarts研二的时候有用过,我就决定用它了. 这里用到一个可以同时显示多条曲线的line-charts,基本样子如下: 看到这个画红色圈圈的地方了吗??? ...

  3. 解决Vim插入模式下backspace按键无法删除字符的问题【转】

    本文转载自:https://blog.csdn.net/zxy987872674/article/details/64124959 最近使用某个服务器编辑文件时,快捷键i进入插入模式后,下方不出现in ...

  4. pexpect实现远程操作

    #!/usr/bin/pythonimport pexpectimport syssip="ssh root@172.10.224.183"try: child=pexpect.s ...

  5. python 低版本一段扫描代码

    个人在做Linux渗透测试往内网跨的时候,通常我碰到的Linux环境都会是如下集中情况 1: DMZ,严格的DMZ,根本跨不到内网里去.这种最恶心了. 2:WEB SERVER,严格区分,工作机和工作 ...

  6. CocoaPods学习系列5——错误集锦

    这篇文章记录使用CocoaPods过程中遇到的一些错误. 1.error:include of non-modular header inside framework module 在自定义类库中,引 ...

  7. RENOUNCEMENT

    I must not think of thee;and,tired yet syrong,I shun the thought that lurks in all delight--The thou ...

  8. cssrem 比例适配理解

    cssrem只是帮你自动计算,省去了你在切图时,从设计稿拿到的px再根据比例转换成rem的中间过程. 这个40我无法猜测, 以前设计稿给的都是按640px(iphone5s的宽)来的,我们就按照这个比 ...

  9. StringUtils在commons-lang3和commons-lang中的区别【转】

    http://blog.csdn.net/eden_m516/article/details/75042439 最近经常需要对String做一些判断和处理,于是就用到了Apache提供的StringU ...

  10. 如何去除pycharm中代码下的波浪线

    Pycharm中新建一个工程,如果不经过配置,在该工程下创建模块写代码,通常是有波浪线的,这样看着很不美观 如何解决这种问题,通常有两种方法 方法一:点击右下角的图标,会出现一个Highlightin ...