IOS学习笔记(17)集成Twitter的功能
来源:互联网 发布:微信埋雷软件多少钱 编辑:程序博客网 时间:2024/05/16 19:02
集成Twitter的功能到你的应用中
把Twitter的功能集成到IOS应用中去
使用Twitter框架库包
#import <Twitter/Twitter.h>
@property(nonatomic,strong)TWTweetComposeViewController *twitterController;
@synthesize twitterController;
twitterController = [[TWTweetComposeViewControlleralloc]init];
__weakViewController *weakSelf = self;
[twitterControllersetCompletionHandler:^(TWTweetComposeViewControllerResult result){
ViewController *strongSelf = weakSelf;
switch (result) {
caseTWTweetComposeViewControllerResultDone:
/*Teh Tweet was submitted successfully. Will be dismissed automatically*/
break;
caseTWTweetComposeViewControllerResultCancelled:{
if(strongSelf != nil){
[strongSelf.twitterControllerdismissModalViewControllerAnimated:YES];
}
break;
}
}
}];
NSString *text =@"Anthony Robbins at Unleash the Power Within(UPW)in Lindon";
[twitterControllersetInitialText:text];
UIImage *anthonyRobbins = [UIImageimageNamed:@"img.jpg"];
[twitterControlleraddImage:anthonyRobbins];
NSURL *url = [NSURLURLWithString:@"http://www.tonyrobbins.com"];
[twitterControlleraddURL:url];
[self.navigationControllerpresentModalViewController:twitterControlleranimated:YES];
TWTweetComposeViewControllerResultCancelled 这个方法是当前用户在进入Twitter界面的时候,然后点击了取消的事件。
TWTweetComposeViewControllerResultDone 这个方法是进入Twitter界面,然后正常的发送了界面中的信息。
- IOS学习笔记(17)集成Twitter的功能
- Twitter登录的集成
- iOS学习笔记55- iOS项目集成ShareSDK实现第三方登录、分享、关注等功能。
- ios学习-- Twitter 的启动动画的实现(bird flying)
- 架构学习笔记—Twitter
- 架构学习笔记—Twitter
- Twitter网站架构学习笔记
- Twitter网站架构学习笔记
- 架构学习笔记—Twitter
- iOS学习笔记--支付宝支付集成
- IOS push功能集成
- 集成学习的方法及功能
- Facebook & Twitter sdk for ios 开发笔记
- iOS支付功能的学习
- ios集成语音朗读功能
- Unity中集成ShareSDK(3.X)的功能-IOS平台
- 关于ios 集成支付宝功能的大概
- iOS 中SharaSDK 发送短信功能的集成
- 10步让你成为更优秀的程序员
- 如何将AIR应用打包成exe
- .NET Framework 类库 Thread.IsBackground 属性
- Edit控件特殊字符处理类
- cocos2d-x初学笔记03:菜单Menu
- IOS学习笔记(17)集成Twitter的功能
- 每次插入一条数据速度很慢,一次全部插入SQL语句过大,个人解决办法是每次插入指定条数
- PostQuitMessage和ExitProcess的区别是什么?
- vim配置
- 程序员的十大烦恼
- XCode+Boost配置
- 使用winrar打包air程序为exe(包含air运行环境)
- Java I/O (2): OutputStream分析
- NSMutableArray的正确释放