I have an app that uses a UITableViewController, core-data, and UITextViews in the table rows which automatically adjust their vertical size based upon the size of the text they hold. The size adjustment is done the old fashioned pre-iOS8 (i.e no autosizing cells) way using tableView:heightForRowAtIndexPath and autolayout constraints. The cells also use auto-layout to position buttons such as a "clear text" button. That button is pinned to be 10pts inside of the superview's (UITableViewCell.contentView) trailing edge.
The code works fine in iOS 6, 7, and 7.1, but fails in iOS 8.1. The layout loads properly in iOS 8.1, but as soon as the user starts typing in the text box, the anchored buttons start jumping around and eventually are placed too far to the right, almost outside of the UITableViewCell.
iOS 7.1, CORRECT:
iOS 8.1, INCORRECT:
If I comment out the line ("translation.text1Text = changedTextView.text;") which binds the changed text to the core data model, the problem doesn't show, but of course the textview doesn't resize properly either. So I'm thinking this may have something to do with how self.tableView beginUpdates/endUpdates interacts with auto-layout constraints in iOS 8.
I have put a full sample app with source code demonstrating the issue on https://github.com/SpencerY2/TestApp2 .
Not sure whether this might be related to either of these two other iOS8 autolayout issues: 1) Issue with Auto Layout on iOS 8 (code works perfectly on iOS 7) , 2) https://stackoverflow.com/questions/26461850/auto-layout-issue-in-ios-8-works-fine-in-ios-7
Any help would be most appreciated.
p.s. the app needs to run on iOS 6+ so using autosizing cells is not an option for now.