How to override requireConstraintBasedLayout in a UIView using Swift 3?

In UIView , docs states that you must override requiresConstraintBasedLayout to return true in your user view if restrictions are required to work.

How do you do this using Swift 3?

+6
source share
1 answer

Use the following syntax to override the recipient:

 override open class var requiresConstraintBasedLayout: Bool { get { return true } } 
+10
source

Source: https://habr.com/ru/post/1015364/


All Articles