04 2018 档案

摘要:def test1(): while True: print('---1---') yield None def test2(): while True: print('---2---') yield None t1 = test1() t2 = test2() while True: t1.__next... 阅读全文
posted @ 2018-04-27 15:38 liuw_flexi 阅读(110) 评论(0) 推荐(0) 编辑
摘要:0123 放开print 控制台打印 0None1None2LW3 说明了temp = yield i 这句话并不是将右边的值赋给temp temp 是接受程序下次从这里开始执行时生成器通过send函数发过来的值。 但是调用send方法前必须先启动生成器才行哦, 不然会崩溃, 调用next()或者 阅读全文
posted @ 2018-04-27 15:02 liuw_flexi 阅读(183) 评论(0) 推荐(0) 编辑
摘要:参考自:https://blog.csdn.net/mushaofeng1990/article/details/62434349 用户触摸屏幕后的事件传递过程: 对view进行重写这两个方法后,就会发现,点击屏幕后,首先响应的是方法A; 如果方法A中,我们没有调用父类的这个方法,那就根据这个方法A 阅读全文
posted @ 2018-04-27 10:07 liuw_flexi 阅读(215) 评论(0) 推荐(0) 编辑
摘要:参考:https://blog.csdn.net/sunnyboy9/article/details/51458401 阅读全文
posted @ 2018-04-25 11:27 liuw_flexi 阅读(458) 评论(0) 推荐(0) 编辑
摘要:例子: 比如 SDPhotoBrowser库 类似微信图片浏览,点击放大之后,在点击一下缩小至原来的大小。这里他的做法就是:利用一个临时 tempView, 那么等缩小的动画完成,从当前界面移除tempView。 好了,坐标转换呢? 这个说的更清楚一点: // 将像素point由point所在视图转 阅读全文
posted @ 2018-04-24 17:03 liuw_flexi 阅读(209) 评论(0) 推荐(0) 编辑
摘要:参考自:https://github.com/jsonmodel/jsonmodel 1.基于名称的自动映射 2. 模型级联(模型包括其他模型) 3.模型集合 或者 4.嵌套键映射 5. 字段中带下划线 6.可选属性(即可以缺失或为空) 7.忽略的属性(即JSONModel完全忽略它们) 8.标量类 阅读全文
posted @ 2018-04-24 11:45 liuw_flexi 阅读(5859) 评论(0) 推荐(0) 编辑
摘要:1. 轮播库SDCycleScrollView 2. 自动布局库SDAutoLayout 3. 类似支付宝福卡滑动切换的效果 https://github.com/huangxuan518/HXCardSwitchView 4. 类似朋友圈图片浏览SDPhotoBrowser :SDAutoLayo 阅读全文
posted @ 2018-04-23 13:46 liuw_flexi 阅读(295) 评论(0) 推荐(0) 编辑
摘要:可以对图层按path进行指定裁剪 阅读全文
posted @ 2018-04-23 13:36 liuw_flexi 阅读(401) 评论(0) 推荐(0) 编辑
摘要:// // ViewController.m // 透明table // // Created by LiuWei on 2018/4/23. // Copyright © 2018年 xxx. All rights reserved. // #import "ViewController.h" @interface ViewController () @property(n... 阅读全文
posted @ 2018-04-23 13:32 liuw_flexi 阅读(226) 评论(0) 推荐(0) 编辑
摘要:比如:获取一个随机整数范围在:[0,100)包括0,不包括100 参考:https://www.jianshu.com/p/106475cbd3da 阅读全文
posted @ 2018-04-23 11:41 liuw_flexi 阅读(144) 评论(0) 推荐(0) 编辑
摘要:// ViewController.m // 形变属性transform // // Created by LiuWei on 2018/4/23. // Copyright © 2018年 xxx. All rights reserved. // #import "ViewController.h" @interface ViewController () @property ... 阅读全文
posted @ 2018-04-23 11:36 liuw_flexi 阅读(162) 评论(0) 推荐(0) 编辑
摘要:看到#ff ff ff 00 00这种 就是啦 。开头两位表示透明度。 阅读全文
posted @ 2018-04-22 15:44 liuw_flexi 阅读(143) 评论(0) 推荐(0) 编辑
摘要:希望实现这个效果,于是在简书上问了一个作者,让我 :先用正常的CAGradientLayer做出渐变色,然后利用CAlayer的mask属性进行裁切 https://www.jianshu.com/p/8c45d8a1645d#comment-23013690 嗯嗯 确实可以 但是还有一个问题就是那 阅读全文
posted @ 2018-04-22 15:01 liuw_flexi 阅读(490) 评论(0) 推荐(0) 编辑
摘要:参考:https://blog.csdn.net/lg_sun/article/details/78913064 -(NSString *)getTimeToken{ NSDateFormatter *dateformatter = [NSDateFormatter new]; dateformatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";... 阅读全文
posted @ 2018-04-17 10:12 liuw_flexi 阅读(519) 评论(0) 推荐(0) 编辑
摘要:某个cell发生数据变化,实时刷新,把变化的cell的indexPath作为参数: 比如微信的朋友圈点赞和评论 [weakSelf.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; leftCapWidth和topCapHeight不变,其他部分等比拉伸:比... 阅读全文
posted @ 2018-04-17 09:24 liuw_flexi 阅读(189) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/u011099640/article/details/53083845 阅读全文
posted @ 2018-04-10 17:56 liuw_flexi 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-04-07 14:18 liuw_flexi 阅读(119) 评论(0) 推荐(0) 编辑
摘要:之前一直以为get就是暴漏请求URL和参数,post就是将参数秘密传输。到现在也没真正搞清楚,项目中是否有必要去完全区别? 来新公司看到以前员工的写法:用http,对参数或者URL加密,然后对返回数据用同一个Key解密。对get和post更茫然了,于是上知乎查了一下,发现这个讲的还是能接受的。 阅读全文
posted @ 2018-04-07 14:17 liuw_flexi 阅读(206) 评论(0) 推荐(0) 编辑
摘要:参考:https://blog.csdn.net/yyyyccll/article/details/71173150 阅读全文
posted @ 2018-04-03 13:18 liuw_flexi 阅读(126) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示