SwiftのUICollectionViewにおけるcellForItemAtとsizeForItemAtの順番:セルの高さを動的に変えるための予備知識

id 17375
user_id 1090
roll_id 1316
order 0
language ja
description UICollectionViewでセルの高さを自動的に調節するためには、sizeForItemAt、cellForItemAt、reloadDataが何をしているかを理解する必要がある。セル内部にテキストがある場合、テキスト量に応じて高さを変更する。高さはboundingRect(with: size, options: .usesLineFragmentOrigin, attributes: attributes, context: nil)で取得する。
image_id 0
tag
created_time 1536344310
updated_time 1555257012

← 戻る