会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
输过败过、但不曾放弃过
博客园
首页
新随笔
联系
订阅
管理
2016年8月16日
oc和javascript互相调用
摘要: 概述: 使用UIWebView加载页面,使用UIWebView的方法stringByEvaluatingJavaScriptFromString调用javascript的方法。 在javascript中使用document.body.appendChild(iFrame)这样的方式唤起UIWebVi
阅读全文
posted @ 2016-08-16 17:36 李伯波
阅读(1053)
评论(0)
推荐(0)
2016年1月19日
AFNetworking2.x https 常用代码
摘要: - (AFSecurityPolicy*)customSecurityPolicy{/**** SSL Pinning ****/NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"你的证书" ofType:@"cer"];NSD...
阅读全文
posted @ 2016-01-19 10:10 李伯波
阅读(302)
评论(0)
推荐(0)
AFNetworking https (引用)
摘要: 引用自http://www.cnblogs.com/jys509/p/5001566.html一般来讲如果app用了web service , 我们需要防止数据嗅探来保证数据安全.通常的做法是用ssl来连接以防止数据抓包和嗅探其实这么做的话还是不够的 。 我们还需要防止中间人攻击(不明白的自己去百度...
阅读全文
posted @ 2016-01-19 10:06 李伯波
阅读(386)
评论(0)
推荐(0)
2015年8月31日
UITextview 垂直居中
摘要: UITextView* content = (UITextView*) [cell viewWithTag:104];[content addObserver:self forKeyPath:@"contentSize" options:(NSKeyValueObservingOptionNew) ...
阅读全文
posted @ 2015-08-31 21:52 李伯波
阅读(970)
评论(0)
推荐(0)
2015年7月3日
通过经纬度计算两点间多距离
摘要: +(CGFloat)getDistanceFrom:(CLLocationCoordinate2D)from To:(CLLocationCoordinate2D)to{ double EARTH_RADIUS = 6371393;//地球半径 单位米 CGFloat dis = sinf(fr...
阅读全文
posted @ 2015-07-03 16:35 李伯波
阅读(251)
评论(0)
推荐(0)
2015年3月27日
iOS 状态机
摘要: objc(TransitionKit):https://github.com/blakewatters/TransitionKitswift(SwiftTask):https://github.com/ReactKit/SwiftTask
阅读全文
posted @ 2015-03-27 16:01 李伯波
阅读(799)
评论(0)
推荐(0)
2015年2月3日
iOS 去掉table前面的空格
摘要: if ([tableViewrespondsToSelector:@selector(setSeparatorInset:)]) { [tableView setSeparatorInset:UIEdgeInsetsZero]; } if ([tableViewrespondsToSele...
阅读全文
posted @ 2015-02-03 16:34 李伯波
阅读(205)
评论(0)
推荐(0)
2015年1月24日
ubuntu 更新系统时间
摘要: 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 李伯波
阅读(4919)
评论(0)
推荐(0)
2014年12月29日
Python 调用 C 语言 so
摘要: $ 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 李伯波
阅读(397)
评论(0)
推荐(0)
2014年11月7日
转 iOS socket
摘要: http://www.cocoachina.com/industry/20130830/6904.html客户端:导入头文件:#import #import #import #import 1. 创建连接CFSocketContext sockContext = {0, // 结构体的版本,必须为...
阅读全文
posted @ 2014-11-07 13:40 李伯波
阅读(192)
评论(0)
推荐(0)
下一页
公告