摘要: 概述: 使用UIWebView加载页面,使用UIWebView的方法stringByEvaluatingJavaScriptFromString调用javascript的方法。 在javascript中使用document.body.appendChild(iFrame)这样的方式唤起UIWebVi 阅读全文
posted @ 2016-08-16 17:36 李伯波 阅读(1040) 评论(0) 推荐(0) 编辑
摘要: - (AFSecurityPolicy*)customSecurityPolicy{/**** SSL Pinning ****/NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"你的证书" ofType:@"cer"];NSD... 阅读全文
posted @ 2016-01-19 10:10 李伯波 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 引用自http://www.cnblogs.com/jys509/p/5001566.html一般来讲如果app用了web service , 我们需要防止数据嗅探来保证数据安全.通常的做法是用ssl来连接以防止数据抓包和嗅探其实这么做的话还是不够的 。 我们还需要防止中间人攻击(不明白的自己去百度... 阅读全文
posted @ 2016-01-19 10:06 李伯波 阅读(375) 评论(0) 推荐(0) 编辑
摘要: UITextView* content = (UITextView*) [cell viewWithTag:104];[content addObserver:self forKeyPath:@"contentSize" options:(NSKeyValueObservingOptionNew) ... 阅读全文
posted @ 2015-08-31 21:52 李伯波 阅读(950) 评论(0) 推荐(0) 编辑
摘要: +(CGFloat)getDistanceFrom:(CLLocationCoordinate2D)from To:(CLLocationCoordinate2D)to{ double EARTH_RADIUS = 6371393;//地球半径 单位米 CGFloat dis = sinf(fr... 阅读全文
posted @ 2015-07-03 16:35 李伯波 阅读(239) 评论(0) 推荐(0) 编辑
摘要: objc(TransitionKit):https://github.com/blakewatters/TransitionKitswift(SwiftTask):https://github.com/ReactKit/SwiftTask 阅读全文
posted @ 2015-03-27 16:01 李伯波 阅读(788) 评论(0) 推荐(0) 编辑
摘要: if ([tableViewrespondsToSelector:@selector(setSeparatorInset:)]) { [tableView setSeparatorInset:UIEdgeInsetsZero]; } if ([tableViewrespondsToSele... 阅读全文
posted @ 2015-02-03 16:34 李伯波 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1. 安装ntpdate工具 # sudo apt-get install ntpdate 2. 设置系统时间与网络时间同步 # ntpdate cn.pool.ntp.org 或者sudontpdatetime.stdtime.gov.tw cn.pool.ntp.org是位于中国的公共N... 阅读全文
posted @ 2015-01-24 15:06 李伯波 阅读(4719) 评论(0) 推荐(0) 编辑
摘要: $ gcc -shared -Wl,-soname,testlib -o testlib.so -fPIC testlib.c如果在Mac OS X ,则$ gcc -shared -Wl,-install_name,testlib.so -o testlib.so -fPIC testlib.ci... 阅读全文
posted @ 2014-12-29 17:24 李伯波 阅读(392) 评论(0) 推荐(0) 编辑
摘要: http://www.cocoachina.com/industry/20130830/6904.html客户端:导入头文件:#import #import #import #import 1. 创建连接CFSocketContext sockContext = {0, // 结构体的版本,必须为... 阅读全文
posted @ 2014-11-07 13:40 李伯波 阅读(183) 评论(0) 推荐(0) 编辑