摘要: 看到人家高明的地方,以及自己想到的处理方法 1、使用相应者链查找下一层级上的视图(以前一直使用代理,感觉写起来太繁琐,不如这个方便,效率也低) UIResponder * next = self.nextResponder; do { if ([next isKindOfClass:[UIViewC 阅读全文
posted @ 2018-01-23 14:30 菜鸟好笨笨! 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 1、NSRunloop https://www.jianshu.com/p/296f182c8faa | | https://www.jianshu.com/p/4263188ed940 2、编程代码规范 http://blog.csdn.net/qs_csu/article/details/538 阅读全文
posted @ 2018-01-17 11:32 菜鸟好笨笨! 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 1、OC常用属性汇总 atomic:生成的setter、getter操作为原子操作,为系统默认,消耗大量资源,执行性能低,但是是线程安全的。 nonatomic:生成的setter、getter操作是非原子操作,推荐手动设置为nonatomic属性,执行性能高,多线程容易出现异常。 assign:用 阅读全文
posted @ 2018-01-15 15:34 菜鸟好笨笨! 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一个可以直接连接服务器MySQL的工具包(极不安全,如非特殊需求,不推荐使用) 这种直接连接服务器数据的方式是极为不安全的,但因为我们这个项目特殊情况,只在局域网内使用, 且只有一个pad对一台设备进行唯一的控制,不存在网络安全问题和其他设备干扰问题,故而最终采用 这种方式进行和设备的直接通讯。 g 阅读全文
posted @ 2018-01-11 13:52 菜鸟好笨笨! 阅读(744) 评论(0) 推荐(0) 编辑
摘要: 1、获取本地版本和互联网版本 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSString * localVersion = [infoDictionary objectForKey:@"CFBundl 阅读全文
posted @ 2018-01-11 10:09 菜鸟好笨笨! 阅读(1754) 评论(0) 推荐(0) 编辑
摘要: 1、view页面翻转 UIViewAnimationOptions option = _isLeft?UIViewAnimationOptionTransitionFlipFromLeft:UIViewAnimationOptionTransitionFlipFromRight; // 法一 [UI 阅读全文
posted @ 2018-01-10 09:18 菜鸟好笨笨! 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 一、开启http 在Info.plist中添加NSAppTransportSecurity类型Dictionary。 在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为yes 二、配置pch文件 $(SRCROOT)/Micro 阅读全文
posted @ 2017-12-19 16:13 菜鸟好笨笨! 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 使用cocopod导入第三方swift包后,编译报以下错误: The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift 阅读全文
posted @ 2017-12-19 15:06 菜鸟好笨笨! 阅读(14779) 评论(0) 推荐(1) 编辑
摘要: 1、使用facebook第三方SRWebSocket进行websocket通讯。 pod 'SocketRocket' ws://192.168.1.128:18882/ws 注意:socket通讯都是用ws开头的 3、初始化 _webSocket = [[SRWebSocket alloc] in 阅读全文
posted @ 2017-12-18 14:33 菜鸟好笨笨! 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 1、实现自身旋转动画效果 不断调用自身这个函数,来实现不停的旋转 [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.1]; [UIView setAnimationDelegate:self]; [UIV 阅读全文
posted @ 2017-11-13 14:42 菜鸟好笨笨! 阅读(171) 评论(0) 推荐(0) 编辑