Yaoyuan Guo

Results 161 comments of Yaoyuan Guo

换行这个,是由 CoreText 控制的,有时确实会有空白地方填充不满的时刻,可能与某些表情有关。具体可以开启调试模式看一下排版结果:https://github.com/ibireme/YYText#debug-1

啊哈,没有任何卵用。。 这块儿只是为了避免编译器 warning。。

相同问题讨论见:https://github.com/ibireme/YYModel/issues/66

DB 是存储持久化数据的,数据应该是不易丢失的,有完善和复杂的方法处理各种请求。 Cache 就相对比较简单和轻量,只是用于快速缓存东西,数据是可以丢弃的。

I can‘t reproduce this problem. You may check your Podfile, or create a new project to test it.

YYLabel 需要设置一下 preferredMaxLayoutWidth,UILabel 在 iOS7 以上一般就不用设置这个值了。

iOS6 下,UILabel 是必须要设置这个值的。。在高版本上,AutoLayout 会尝试自动合成,但有时 UILabel 自动布局有问题时也需要手动设置这个值。

autolayout 需要 label 提供一个 size,但这时内部为了计算 size,首先需要一个最大宽度来做限制。苹果的文档写着,内部这时候不应该访问自身的 frame 属性,因为这时候 frame 还有待 autolayout 来确定,所以这时候也不能直接用 label 的宽度。 至于 UILabel 做了什么改动这个就不清楚了,我觉得可能与 autolayout 有内部的配合流程。

Different imageViews may have different playback progress, so you may cache all frames in memory. You may `[UIImage animatedImageWithImages:duration:]` instead.

The cache need to spend more resources and code to check the object, storage related data, and this may reduce the performance, so it's not supported currently. I will consider...