IOS 7 Study - UIActivityViewController(Presenting Sharing Options)
2014-02-11 17:16
393 查看
You want to be able to allow your users to share content inside your apps with their
friends, through an interface, such as Facebook and Twitter.
![](http://images.cnitblog.com/blog/72194/201402/111715095913199.png)
Solution
Create an instance of the UIActivityViewController class and share your content
through this class.
eg: you have a text field where the user can enter text to be shared, and a
Share button right near it. When the user presses the Share button, you will simply pass
the text of the text field to your instance of the UIActivityViewController class. Here
is our code. We are writing this code for iPhone, so we will present our activity view
controller as a modal view controller.
friends, through an interface, such as Facebook and Twitter.
![](http://images.cnitblog.com/blog/72194/201402/111715095913199.png)
Solution
Create an instance of the UIActivityViewController class and share your content
through this class.
eg: you have a text field where the user can enter text to be shared, and a
Share button right near it. When the user presses the Share button, you will simply pass
the text of the text field to your instance of the UIActivityViewController class. Here
is our code. We are writing this code for iPhone, so we will present our activity view
controller as a modal view controller.
相关文章推荐
- 2.11 Presenting Sharing Options with UIActivityViewController
- Presenting Sharing Options with UIActivityViewController
- iOS - UIActivityViewController
- iOS UIActivityViewController 接入WeChatSDK 微信 朋友圈分享
- iOS开发之UIActivityViewController
- ios关于自带分享UIActivityViewController
- ios: push viewcontroller 时出现Presenting view controllers on detached view controllers is discouraged
- iOS 6新特性UIActivityViewController使用教程(一)
- iOS 6新特性UIActivityViewController使用教程
- [iOS]使用UIActivityViewController实现AirDrop功能
- iOS didFinishLaunchingWithOptions方法里获取storyBoard的rootViewController
- iOS UIActivityViewController简单使用
- 【IOS】利用UIActivityViewController实现分享视频,图片,链接
- iOS UIActivityViewController 实现微信微博等等的分享功能
- iOS开发中活动视图控制器UIActivityViewController的应用
- iOS 原生UIActivityViewController(分享功能)
- iOS 两种系统分享(配Demo下载)UIActivityViewController 和 SLComposeViewController
- iOS基础 -- UIActivityViewController
- iOS --- 使用UIActivityViewController实现分享功能
- iOS 6新特性UIActivityViewController使用教程(一)