2015年9月13日

QQ简单登录

摘要: 1.下载QQ官方API文档,导入对应的包2.在Info->URL Types文件添加Identifier:tencent URL Schemes:tencent+应用appkey(去腾讯后台注册)3.Appdelegate文件#pragma mark --- QQLogin------ (BOOL)... 阅读全文

posted @ 2015-09-13 18:58 Baymax01 阅读(417) 评论(0) 推荐(0) 编辑

地图简单事例代码

摘要: 一:百度地图 1.按照API文档导入相应的库 2.AppDelegate文件 3.对应的viewController文件 二:高德地图 1.AppDelegate设置key值(高德后台注册) #import <MAMapKit/MAMapKit.h> [MAMapServices sharedSer 阅读全文

posted @ 2015-09-13 18:41 Baymax01 阅读(220) 评论(0) 推荐(0) 编辑

2015年9月11日

UIWebView中Html中用JS调用OC方法及OC执行JS代码

摘要: 1.HTML页面 1 2 3 4 5 HTML中用JS调用OC方法 6 7 8 9 22 23 24 25 26 27 28 29 30 31 32 33 ... 阅读全文

posted @ 2015-09-11 19:35 Baymax01 阅读(200) 评论(0) 推荐(0) 编辑

iOS登陆各种验证(持续更新)

摘要: 1 //邮箱 2 + (BOOL) justEmail:(NSString *)email 3 { 4 NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; 5 NSPredicate... 阅读全文

posted @ 2015-09-11 19:09 Baymax01 阅读(197) 评论(0) 推荐(0) 编辑

2015年9月7日

ios时间处理

摘要: 1.获取时间的年,月,日,时,分,秒 1 //"expireDatetime": "2015-07-28 17:29:48.0" 转换 2 NSString *dateStr = [model.expireDatetime substringToIndex:model.expir... 阅读全文

posted @ 2015-09-07 15:17 Baymax01 阅读(131) 评论(0) 推荐(0) 编辑

剪裁图片

摘要: 方法一: //背景图片 UIImageView *bgImageView = [MyUtil createImageViewFrame:CGRectMake(0, 0, 65, 23) imageName:@"StarsBackground"]; [self addSubview:bgImageVi 阅读全文

posted @ 2015-09-07 15:15 Baymax01 阅读(74) 评论(0) 推荐(0) 编辑

GCD详情

摘要: 1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)viewDidLoad { 10 [super viewDidLoad]; 11 // Do an... 阅读全文

posted @ 2015-09-07 15:09 Baymax01 阅读(169) 评论(0) 推荐(0) 编辑

GCD

摘要: 1 //GCD (grand central dispatcher) 2 //队列 3 4 //串行队列 5 //前面的现场执行完成,才会开始执行后面加入的线程 6 //并行队列 7 //前面加入的线程和后面加入的线程同时执行 8 9 //1.主线程所在的串行队列 10 //系统自动创建这个队列... 阅读全文

posted @ 2015-09-07 15:08 Baymax01 阅读(184) 评论(0) 推荐(0) 编辑

Block详情

摘要: 1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)viewDidLoad { 10 ... 阅读全文

posted @ 2015-09-07 15:07 Baymax01 阅读(129) 评论(0) 推荐(0) 编辑

使用Block,线程封装网络请求

摘要: 1.MyDownloader.h 1 #import <Foundation/Foundation.h> 2 3 @interface MyDownloader : NSObject 4 5 -(void)downloadWithUrlString:(NSString *)urlString fin 阅读全文

posted @ 2015-09-07 15:06 Baymax01 阅读(179) 评论(0) 推荐(0) 编辑

导航