Setting `separatorInset` in `layoutSubviews` on a UITableViewCell causes a hang when the table view showing the cell has `cellLayoutMarginsFollowReadableWidth` set to true
| Originator: | eli.j.perkins | ||
| Number: | rdar://28800764 | Date Originated: | 10/17/2016 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 10 |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: Given a `UITableViewCell` subclass sets a custom `separatorInset` value in it's `layoutSubviews` method, in this example called `CustomInsetCell`, and a `UITableView` displaying the cell has `cellLayoutMarginsFollowReadableWidth` set to `true`, upon rotating the table view, an infinite set of calls to `CustomInsetCell.layoutSubviews()` occurs, due to the method setting the `separatorInset`. Steps to Reproduce: 1. Open sample attached to this bug 2. Rotate the device Expected Results: The table view handles rotation, maintaining the custom `separatorInset` value. Actual Results: The application freezes upon rotation due to infinite calls to `CustomInsetCell.layoutSubviews()` Version: iOS 10 Notes: Configuration: any Attachments: See https://github.com/eliperkins/TableViewSeparatorFreeze
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!