What is NSLayoutConstraint “UIView-Encapsulated-Layout-Height” and how should I go about forcing it to recalculate cleanly?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a UITableView running under iOS 8 and I'm using automatic cell heights from constraints in a storyboard. One of my cells contains a single UITextView and I need it to contract and expand based on user input - tap to shrink/expand the text. I'm doing this by adding a runtime constraint to the text view and changing the constant on the constraint in response to user events: -( void ) collapse :( BOOL ) collapse ; { _collapsed = collapse ; if ( collapse ) [ _collapsedtextHeightConstraint setConstant : kCollapsedHeight ]; // 70