Change height constraint programmatically

前端 未结 1 869
小蘑菇
小蘑菇 2020-12-15 03:49

I want to change the height constraint of a UITextView programmatically so I set the constraint as an outlet in my controller like this:

@property (strong, n         


        
1条回答
  •  一整个雨季
    2020-12-15 04:02

    Try setting the constant in viewDidLayoutSubviews instead.

    Note that using the text view's contentSize property to set the text view's height does not work in iOS 7. See https://stackoverflow.com/a/18837714/1239263

    0 讨论(0)
提交回复
热议问题