摘要: ReactiveCocoa 是一个框架,它允许你在你的iOS程序中使用函数响应式(FRP)技术。加上第一部分的讲解,你将会学会如何使用信号量(对事件发出数据流)如何替代标准的动作和事件处理逻辑。你也会学到如何转换、分离和组合这些信号量。 在这里,也就是第二部分里,你将会学到更多先进的Reactive 阅读全文
posted @ 2016-12-23 11:31 D-Ben 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 作为一个iOS开发者,你写的每一行代码几乎都是在响应某个事件,例如按钮的点击,收到网络消息,属性的变化(通过KVO)或者用户位置的变化(通过CoreLocation)。但是这些事件都用不同的方式来处理,比如action、delegate、KVO、callback等。ReactiveCocoa为事件定 阅读全文
posted @ 2016-12-23 11:29 D-Ben 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 导入头文件:#import "Reachability.h" 然后将 SystemConfiguration.framework 添加进工程: 1、检查当前的网络状态(wifi、WAN还是无网络) NetworkEnvironment.h: NetworkEnvironment.m: 调用方法: 2 阅读全文
posted @ 2016-12-23 11:25 D-Ben 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 1、模拟器沙盒目录文件都在个人用户名文件夹下的一个隐藏文件夹里,中文叫资源库,他的目录其实是Library。因为应用是在沙箱(sandbox)中的,在文件读写权限上受到限制,只能在几个目录下读写文件:Documents:应用中用户数据可以放在这里,iTunes备份和恢复的时候会包括此目录tmp:存放 阅读全文
posted @ 2016-12-23 11:20 D-Ben 阅读(225) 评论(0) 推荐(0) 编辑
摘要: BMKMapPoint point1 = BMKMapPointForCoordinate(_userGps); BMKMapPoint point2 = BMKMapPointForCoordinate(CLLocationCoordinate2DMake(latitude, longitude) 阅读全文
posted @ 2016-12-23 11:18 D-Ben 阅读(209) 评论(0) 推荐(0) 编辑
摘要: - (CLLocationCoordinate2D)hhTrans_GCGPS:(CLLocationCoordinate2D)baiduGps { const double x_pi = 3.14159265358979324 * 3000.0 / 180.0; CLLocationCoordin 阅读全文
posted @ 2016-12-23 11:17 D-Ben 阅读(188) 评论(0) 推荐(0) 编辑
摘要: CLLocationCoordinate2D coor = CLLocationCoordinate2DMake(latitude, longitude);//原始坐标 //转换 google地图、soso地图、aliyun地图、mapabc地图和amap地图所用坐标至百度坐标 NSDictiona 阅读全文
posted @ 2016-12-23 11:16 D-Ben 阅读(580) 评论(0) 推荐(0) 编辑
摘要: - (void)drawRect:(CGRect)rect { UIBezierPath * path = [UIBezierPath bezierPath]; [path moveToPoint:CGPointMake(fView_Width(self)/2., 6*DX_Proportion)] 阅读全文
posted @ 2016-12-23 11:12 D-Ben 阅读(2179) 评论(0) 推荐(0) 编辑
摘要: + (NSString *)formatterDate:(NSNumber *)desDate WithDateFormatter:(NSString *)formatter{ NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] ini 阅读全文
posted @ 2016-12-23 11:09 D-Ben 阅读(739) 评论(0) 推荐(0) 编辑
摘要: + (CGFloat)achiveWidthAttrString:(NSAttributedString *)attrString withHeight:(CGFloat)height { CGRect desRect = [attrString boundingRectWithSize:CGSiz 阅读全文
posted @ 2016-12-23 11:08 D-Ben 阅读(813) 评论(0) 推荐(0) 编辑