摘要: 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珊 阅读(481) 评论(0) 推荐(0) 编辑
摘要: - (IBAction)StartDownLoad:(UIButton *)sender { //NSString *urlstr = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSStrin... 阅读全文
posted @ 2015-06-11 15:52 app珊 阅读(256) 评论(0) 推荐(0) 编辑
摘要: - (IBAction)login:(UIButton *)sender { NSString *username = self.usrnameTextField.text; NSString *password = self.pwdTextField.text; NSString *u... 阅读全文
posted @ 2015-06-11 14:32 app珊 阅读(99) 评论(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珊 阅读(357) 评论(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珊 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 准备URL NSString *urlStr = self.textField.text;根据URL来准备一个请求对象 NSURL *url = [NSURL URLWithString:urlStr];发送请求 NSURLRequest *request = [NSURLRequest reque... 阅读全文
posted @ 2015-06-10 16:27 app珊 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 概念:如何将NSString转化成NSData(将字符串转化成二进制数据)NSString *str = @"ABCDE"; NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding]; NSLog(@"%d",data.len... 阅读全文
posted @ 2015-06-10 15:51 app珊 阅读(145) 评论(0) 推荐(0) 编辑
摘要: - (IBAction)blockQueue:(UIButton *)sender { NSOperationQueue *queue = [[NSOperationQueue alloc]init]; NSBlockOperation * operation = [NSBloc... 阅读全文
posted @ 2015-06-10 12:04 app珊 阅读(888) 评论(0) 推荐(0) 编辑
摘要: 创建NSOperationQueue 对象NSOperationQueue *queue = [[NSOperationQueue alloc]init];创建NSInvocationOperation对象NSInvocationOperation *operation = [[NSInvocati... 阅读全文
posted @ 2015-06-10 11:47 app珊 阅读(127) 评论(0) 推荐(0) 编辑