同步Get方式 1 // MARK: - 同步Get方式 2 func synchronousGet() 3 { 4 //创建NSURL对象 5 var url:NSURL! = NSURL(string: "http://m.weather...
分类:
移动开发 时间:
2015-06-07 23:16:03
阅读次数:
206
NSURLSession详解 1 // MARK: - /* 使用NSURLSessionDataTask加载数据 */ 2 func sessionLoadData() 3 { 4 //创建NSURL对象 5 var url:NSU...
分类:
移动开发 时间:
2015-06-07 23:08:54
阅读次数:
187
在iOS5以下版本使用以下方法:【IOS5.1+之后不能使用此方法,iOS8的跳转方法已找到见下方,iOS7的正在摸索,欢迎大家给出观点意见】
通过URL Scheme的方式打开内置的Settings,代码如下[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICE...
分类:
移动开发 时间:
2015-06-05 19:51:46
阅读次数:
146
nil:指向oc中对象的空指针Nil:指向oc中类的空指针NULL:指向其他类型的空指针,如一个c类型的内存指针NSNull:在集合对象中,表示空值的对象NSURL *url = nil;Class class = Nil;int*pointerInt = NULL;nil是一个对象指针为空,Nil...
分类:
其他好文 时间:
2015-06-05 07:29:46
阅读次数:
87
数据请求总结 1 //**************************************GET 2 //同步 3 /* 4 //第一步,创建URL 5 NSURL * url = [[NSURL alloc]initWithString:@"http://e.hiphotos.b...
分类:
移动开发 时间:
2015-06-04 22:39:54
阅读次数:
220
//惨痛经历,,,- (void)saveToAlbumWithImage:(UIImage*)image completionBlock:(void (^)(NSURL *assetURL))completionBlock failureBlock:(void (^)(NS...
分类:
其他好文 时间:
2015-06-04 20:43:45
阅读次数:
145
NSString* localPath = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"jpg"]; NSURL* fileUrl = [NSURL fileURLWithPath:localPath]; CIImage* ...
分类:
移动开发 时间:
2015-06-04 13:42:04
阅读次数:
257
//调用自带mail [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://admin@hzlzh.com"]]; //调用电话 [[UIApplication sharedAp...
分类:
移动开发 时间:
2015-06-04 00:57:47
阅读次数:
177
一、NSURLConnection的常用类(1)NSURL:请求地址(2)NSURLRequest:封装一个请求,保存发给服务器的全部数据,包括一个NSURL对象,请求方法、请求头、请求体....(3)NSMutableURLRequest:NSURLRequest的子类(4)NSURLConnec...
分类:
移动开发 时间:
2015-06-03 23:05:54
阅读次数:
253
1 UIWebView *wv = [[UIWebView alloc] init]; // 初始化浏览器控件UIWebView2 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://w...
分类:
Web程序 时间:
2015-05-30 14:54:07
阅读次数:
167