ios - what is NSLayoutConstraint "UIView-Encapsulated-Layout-Height" and how should I go about forcing it to recalculate cleanly -
I have a UITableView under iOS 8 and I have been able to manually block them A storyboard using heights.
One of my cells has a UITextView and I need to contract and extend it on the basis of user input - tap to shrink / expand text.
I am making a continuous change in the text view by adding a runtime barrier and answering user events:
- (zero) collapse: collapse (BOOL) ; {_collapsed = collapse; If (Fall) [_collapsedtextHeightConstraint Set Constant: kCollapsedHeight]; // 70.0 Other [_collapsedtextHeightConstraint Set Constant: [self-idealized lightweight shoal text]]; [Self Setdowns Update Consultants]; } Whenever I do this, I wrap it in the tableView update and set the requirements for tableview UpdateConstraint:
[table view start update]; [_briefCell Fall:! _ Show full nonsense]; [Update tableview set up prompt]; // I have also tried RIO animation with the [self.tableView reloadRowsAtIndexPaths: @ [index]: UITableViewRowAnimationTop; // Absolutely same result [update table view end]; When I do this, my cell expands (and animates it while doing), but I get a barrier warning:
2014-07-31 13: 29: 51.792 onefilethrath [5505: 730175] unable to meet obstacles together. There is probably at least one obstacle in the following list that you do not want. Try it: (1) Look at each obstacle and try to figure out what you do not expect; (2) Get the code that connects unwanted obstacles or obstacles and can fix it. (Note: If you are looking at NSAutoresizingMaskLayoutConstraints, then you should specify the documentation for the translation of UIView Properties. Order Mascinate Consultants ("& lt; NSLayoutConstraint: 0x7f94dced2b60 V: [UITextView: 0x7f94d9b2b200'Brief Text: Iem Ipsum i ... ' (388)] & gt; "" & LT; NSLayoutConstraint: 0x7f94dced2260 V: [UITextView: 0x7f94d9b2b200'Brief text: Lorem Ipsum I ... '] - (15) - | (name:' | ': UITableViewCellContentView: 0x7f94de5773a0) & gt; "" & LT; NSLayoutConstraint: 0x7f94dced2350 V: | - (6) - [UITextView: 0x7f94d9b2b200'Brief text: Lorem Ipsum I ... "] (name: '|': UITableViewCellContentView: 0x7f94de5773a0) & gt;" , & Lt; NSLayoutConstraint for: 0x7f94dced6480 'UIView-Encapsulated-Layout-Height' V: [UITableVie wCellContentView: 0x7f94de5773a0 (91)] & gt; ") will attempt to break the barrier recovery & lt; NSLayoutConstraint: 0x7f94dced2b60 V: [UITextView: 0x7f94d9b2b200'Brief Text: Lorem Ipsum i ... '(388)] & gt; < I have other constraints on my calculation height UITexview from my xcode / ii. The last one is bothering me - I think the UIView-Encapsulated-Layout-Height is the height of the calculation of the cell, when it is sung for the first time - (I However, it does not seem right that this derivative barrier has overruled an updated user CNSTRT.
Even worse, although the layout code says that it is trying to break my height barrier, it is not like - I want to recalculate this cell height and draw everything as a draw.
So, what NSLayoutConstraint UIView- explained layout-height (My guess is that this automatic height calculation of loss cell sizing ) And how should I go about compelling it to recalculate properly?
Try reducing the priority of your _collapsedtextHeightConstraint 999 system like this UIView-explained-layout-height constraint always takes precedence to supply
Is based on returning the -tableView in you:. HeightForRowAtIndexPath: . Be sure to return the right value and your obligation and generate the same should be the same. The lower priority for your brief obstacle is only necessary to temporarily stop the conflict, while the fall / expansion animations are in flight.
Comments
Post a Comment