简体   繁体   中英

how do I handle subview resizing in a UITableViewCell going in & out of EDIT MODE?

QUESTION - How do I handle subview resizing in a UITableViewCell going in & out of EDIT MODE?

BACKGROUND - I've worked out how to size my UiLabels & UITableViewCell based around the text & font used. I'm currently doign this in cellForRowAtIndexPath (I'm programmatically creating UILabels and adding as subviews to the existing contentView)

ASPECTS - So I'm hoping the answer would clear up things for me including:

  1. Is the approach based around the fact one has to manually re-determine subview (eg UILabel) positioning (eg x/y/height/width) each time the UITableView goes into and out of edit mode?

  2. If YES - which methods would one normally do this in? eg cellForRowAtIndexPath?

  3. If YES - in terms of catering for EDIT mode can one just assume a standard (non-changing) reduction amount (in pixcels) for the edit icons that would appear?

  4. If NO - What is the approach here then? use of scaling somehow? which attributes are requried to be set to allow this to happen automatically

thanks

事实上, 这里得到了答案。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM