boundingRectWithSize 使用总结(持续更新) 2018 03 23

401 阅读1分钟

官方文档

This method returns fractional sizes (in the size component of the returned CGRect); to use a returned size to size views, you must raise its value to the nearest higher integer using the ceil function.

∵ 计算出来的size 包含有小数点(fractional) ∴ 需要通过 ceilC函数计算 nearest higher interger