V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  babyboy12  ›  全部回复第 2 页 / 共 8 页
回复总数  148
1  2  3  4  5  6  7  8  
2017 年 3 月 10 日
回复了 babyboy12 创建的主题 iOS 关于 UITableViewCell 重用的问题
@kera0a 我现在改了一种方式,就是在 setModal 里,开始就把缓存里的约束,也就是上一个 cell 可能已经设置了的约束 deactivate 掉,怎么滚都显示对了,然后还是报下面的错

Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<SnapKit.LayoutConstraint:[email protected]#110 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.left == UITableViewCellContentView:0x7faac0c34920.left + 10.0>",
"<SnapKit.LayoutConstraint:[email protected]#110 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.top == UITableViewCellContentView:0x7faac0c34920.top + 10.0>",
"<SnapKit.LayoutConstraint:[email protected]#111 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.width == 40.0>",
"<SnapKit.LayoutConstraint:[email protected]#122 UILabel:0x7faac0e3a1e0.left == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.right + 10.0>",
"<SnapKit.LayoutConstraint:[email protected]#123 UILabel:0x7faac0e3a1e0.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.UIView:0x7faac0e43ce0.top>",
"<SnapKit.LayoutConstraint:[email protected]#127 UILabel:0x7faac0e3a360.left == UILabel:0x7faac0e3a1e0.left>",
"<SnapKit.LayoutConstraint:[email protected]#136 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.left == UILabel:0x7faac0e3a360.left>",
"<SnapKit.LayoutConstraint:[email protected]#137 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.right == UITableViewCellContentView:0x7faac0c34920.right>",
"<SnapKit.LayoutConstraint:[email protected]#147 UILabel:0x7faac0e3ec10.bottom == UITableViewCellContentView:0x7faac0c34920.bottom - 10.0>",
"<NSLayoutConstraint:0x7faac0d77800 'UIView-Encapsulated-Layout-Width' H:[UITableViewCellContentView:0x7faac0c34920(375)]>",
"<NSLayoutConstraint:0x7faac0d77ae0 'UIView-Encapsulated-Layout-Height' V:[UITableViewCellContentView:0x7faac0c34920(87.22)]>",
"<SnapKit.LayoutConstraint:[email protected]#60 UIView:0x7faac0f300d0.height == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.width * 0.333333343267441 - 10.0>",
"<SnapKit.LayoutConstraint:[email protected]#78 UIView:0x7faac0f300d0.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.top>",
"<SnapKit.LayoutConstraint:[email protected]#84 UIView:0x7faac0f300d0.bottom == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.bottom>",
"<SnapKit.LayoutConstraint:[email protected]#226 \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.top == UILabel:0x7faac0e3a1e0.bottom + 10.0>",
"<SnapKit.LayoutConstraint:[email protected]#270 UILabel:0x7faac0e3ec10.top == \U00c1\U00c6\U00c4\U00ca\U220f\U220f.ImageCell:0x7faac0e445d0.bottom + 10.0>"
)

Will attempt to recover by breaking constraint
<SnapKit.LayoutConstraint:[email protected]#84 UIView:0x7faac0f300d0.bottom == ÁÆÄÊ∏∏.ImageCell:0x7faac0e445d0.bottom>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2017 年 3 月 10 日
回复了 babyboy12 创建的主题 iOS 关于 UITableViewCell 重用的问题
@kera0a 我不知道是不是 remake 跟先 remove 再 make 是不一样的?
我试了 remove 再 make 显示是正常的,但还是会报错。一定要用 remake 吗?
2017 年 3 月 10 日
回复了 babyboy12 创建的主题 iOS 关于 UITableViewCell 重用的问题
@kera0a
是这样的 一个 cell 里有 头像 昵称 文字 展开 图片 以及时间 开始的时候我是分成了两个,一个是专门显示文字的,一个是有图片的,两种 cell ,但是需求是 除了头像 昵称 及时间,其它都可能隐藏 /显示,所以即使分成两个,也避免不了上面的问题,所以现在我干脆就弄一起。

再一个是 我查了文档是说,如果我先 make 了 left right top ,我想再新增加一个约束,是用 make ,但是如果是想更新 left right top 这三者,我应该是用 updateConstraints 吧?
再就是 remake 实际也是先 remove 再 make ,那我先 removeConstraints 再 makeConstraints 应该是一样的吧?
2017 年 3 月 4 日
回复了 daohang 创建的主题 分享发现 美橙互联 免费邮箱 5G
@tux 不当讲
顶楼主出谷歌 >.<
苍天呐 百度。。。。
2017 年 2 月 28 日
回复了 yungun 创建的主题 Apple 有人能说一说关于 BeatsX 的使用体验么
- -! 我的 x 一会儿就要到了 我是去了 apple store 试戴了 AirPods 跟 x 后,决定买 x 的
开始的时候只觉得 x 价格比 AirPods 便宜
当试戴完了 就毫不犹豫的选了 x
1 、我是不清楚买 AirPods 的同学 是要另外再买防丢的链子 还是耳朵合适到完全不会掉 毕竟这么贵一东西,掉了我真心肉疼 原来考虑 如果要买 AirPods 我也会配合某宝上那些防丢的链子
2 、还记得 AirPods 的广告跟的美国小伙吗?听着 Down 然后到了街上 拿下来就能听到街上嘈杂的声音 一戴上 音乐又开始响起 可能是为了说明耳机自动戴上后自动播放音乐的特性,但却让我觉得 是不是同时想表达 AirPods 可以让你沉浸于音乐?不管是否如此,去试戴后的感觉就是,戴了跟没戴没啥区别,不光是重量,周围的声音基本听的也挺清楚

试戴 x 的感觉是
1 、我完全找不到耳机上 L R 的标记位,找了半天 甚至连工作人员都找不到 找了好久才找到,开始我在未分清左右的情况下,戴反了,但我却反而觉得戴反了更有安全感。如果戴对了,耳塞是朝外的,但如果戴反了,耳塞是朝内的,就基本等于整个耳塞都躲到了耳朵里
2 、音质方面 AirPods 跟 x 真没法比, AirPods 这方面 其实就相当于是一个没线的 EarPod 而已

我觉得给自己一些容错空间比较好,如果你不能确保你随时都处于人少、周边有序的前提下,
试想一下这些场景:
1 、蹲着坑,听着歌,突然碰掉了。。。
2 、跑步或工作环境下走着被人撞到,掉地上不说,如果周围人多,就是一脚!
3 、地铁、公交车?各种可能性应有尽有

当然 你要钱多 不怕摔不怕丢 那就随意了
2017 年 2 月 14 日
回复了 497127000 创建的主题 新手求助 mac 小白 请教些问题~谢谢各位了
习惯 touchpad 后 最多的操作就是键盘跟多指操作
2017 年 2 月 14 日
回复了 497127000 创建的主题 新手求助 mac 小白 请教些问题~谢谢各位了
@497127000 你那个是有 forcetouch 的 mac 吗 如果有的话 在 dock 图标上重按 否则你可以四指往上推 就全出来了
2017 年 2 月 14 日
回复了 497127000 创建的主题 新手求助 mac 小白 请教些问题~谢谢各位了
1 是 cmd+tab 但我觉得应该适应触控板操作 四指往上推 这样的操作比较舒服
2 触控板操作 chone 标签是啥意思?是 cmd+1 2 3 这样的切换?
2017 年 2 月 13 日
回复了 mutelog 创建的主题 程序员 来聊聊程序猿的单身困境
如果只求是母的 而且你长相贫贫的话,找个长相一般以下的姑娘追 问题也不大的 因为一般程序员都比较有钱还没地儿花,当然 要是你三寸不烂之舌,也不排队能找到个美若天仙的女同志,说白了,如今这个不是一究二白的年代里,还是嘴的问题。
但如果你比较有追求,那:
@kiro 哈哈哈哈 挺赞同你的观点的
拼命工作,尽可能让自己在足够短的时间里提升到一定水准,比如 5 年时间,让自己的技术足够成熟,就可以让自己手上尽可能少的编码工作,比如你变成技术部门主管之类的,那这样你基本也谈不上是真正的程序猿了,其实说白了就是一个道理,让你好好念书的时候,你总想着女朋友,那学业咋整?技术又不咋地,工资自然也不咋地,那你还有啥闲钱搞这搞那?基础建筑代表上层建设,挺现实的问题
2017 年 2 月 12 日
回复了 ufjfeng 创建的主题 Apple Beats X 已经可以买了
@skylancer 我不知道是不是根据设备来的 反正我另一个 apple id 弄了三个月的在用 常用的之前的到期就没用了
2017 年 2 月 11 日
回复了 ufjfeng 创建的主题 Apple Beats X 已经可以买了
你申请个新的 Apple ID 也送 3 个月
2017 年 2 月 10 日
回复了 amanbolatbalabek 创建的主题 程序员 小老外在国内做程序猿好吗?
首先,我在想要是中国人发这么一个帖子 会不会有这么多人回复 回复的是不是这么冷静 - -!!
其次,小老外,你中文好好 - -!!!
再者,想干就去干吧, IT 领域其实挺纯粹的,别纠结太多。
2017 年 2 月 10 日
回复了 stevenkang 创建的主题 Java 如何评价阿里巴巴公布《阿里巴巴 Java 开发手册》?
看着好的学习一下 that's it
老板懂编程有耐心点的 不会因为你花一天时间而怎么 如果你爱学 有自觉能力 他会觉得你很棒 但如果你没啥学习动力 那就得看看你进去时谈的薪资了 如果是 2000 那你慢慢玩就好 如果你谈的 10k 那基本你不走 他也会赶你走了
2017 年 1 月 16 日
回复了 livevilwt 创建的主题 程序员 请教一个 md5 的问题
你上传之前 拿全文件计算好 不就好了吗
再把键位改成 vim-like 的 你就再也不想用其它键盘了
2017 年 1 月 3 日
回复了 babyboy12 创建的主题 问与答 新 MBP 的磁吸电源线 Snapnator 开卖了
@OrangeM21 要交关税吗?
1  2  3  4  5  6  7  8  
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3287 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 37ms · UTC 11:16 · PVG 19:16 · LAX 04:16 · JFK 07:16
♥ Do have faith in what you're doing.