会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
app珊
博客园
首页
新随笔
联系
订阅
管理
2016年1月25日
cocoapad 安装
摘要: 1、升级Ruby环境终端输入:$gem update --system此时会出现ERROR: While executing gem ... (Gem::FilePermissionError)You don‘t have write permissions for the /Library/Rub...
阅读全文
posted @ 2016-01-25 10:39 app珊
阅读(518)
评论(0)
推荐(0)
2015年6月11日
利用NSURLSession在网络里下载视频
摘要: - (IBAction)StartDownLoad:(UIButton *)sender { //NSString *urlstr = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSStrin...
阅读全文
posted @ 2015-06-11 15:52 app珊
阅读(263)
评论(0)
推荐(0)
NSURLSession
摘要: - (IBAction)login:(UIButton *)sender { NSString *username = self.usrnameTextField.text; NSString *password = self.pwdTextField.text; NSString *u...
阅读全文
posted @ 2015-06-11 14:32 app珊
阅读(102)
评论(0)
推荐(0)
从网络上下载大文件(视频)
摘要: - (IBAction)getbigfile:(UIButton *)sender { NSString *str = @"http://b.hiphotos.baidu.com/video/pic/item/e850352ac65c1038698cd94eb7119313b17e894f.j...
阅读全文
posted @ 2015-06-11 11:35 app珊
阅读(362)
评论(0)
推荐(0)
登录时输入了中文要转码
摘要: NSString *urlStr =[NSString stringWithFormat:@"http://qzone.qq.com/login?username=%@&pwd=%@",username,password];urlStr = [urlStr stringByAddingPercent...
阅读全文
posted @ 2015-06-11 10:50 app珊
阅读(170)
评论(0)
推荐(0)
2015年6月10日
与服务器交互
摘要: 准备URL NSString *urlStr = self.textField.text;根据URL来准备一个请求对象 NSURL *url = [NSURL URLWithString:urlStr];发送请求 NSURLRequest *request = [NSURLRequest reque...
阅读全文
posted @ 2015-06-10 16:27 app珊
阅读(195)
评论(0)
推荐(0)
NSData类
摘要: 概念:如何将NSString转化成NSData(将字符串转化成二进制数据)NSString *str = @"ABCDE"; NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding]; NSLog(@"%d",data.len...
阅读全文
posted @ 2015-06-10 15:51 app珊
阅读(149)
评论(0)
推荐(0)
多线程-NSBlockOperation
摘要: - (IBAction)blockQueue:(UIButton *)sender { NSOperationQueue *queue = [[NSOperationQueue alloc]init]; NSBlockOperation * operation = [NSBloc...
阅读全文
posted @ 2015-06-10 12:04 app珊
阅读(891)
评论(0)
推荐(0)
多线程-NSOperationQueue
摘要: 创建NSOperationQueue 对象NSOperationQueue *queue = [[NSOperationQueue alloc]init];创建NSInvocationOperation对象NSInvocationOperation *operation = [[NSInvocati...
阅读全文
posted @ 2015-06-10 11:47 app珊
阅读(130)
评论(0)
推荐(0)
公告