autolayout - Why can't add constraints for the UIView created in storyboard? -


I try to add obstacles to UIview which is the IBOutlet property, but it does not seem and I also translatesAutoresizingMaskIntoConstraints Set to number

  - (zero) viewDidoadload {[Super Viewedloadload]; // Set any additional setup after loading the scene, usually from a nib \ [_view1 setTranslatesAutoresizingMaskIntoConstraints: No]; NSDictionary * Visual = NSDictionaryOfVariableBindings (_view1); [Self.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @ "V: [_view1 (40)] -30- |" Options: 0 metric: zero views: view]]; [Self.view addConstraints: [NSLayoutConstraint constraintsWithVisualFormat: @ "H: | -10 - [_view1 (30)]" option: 0 metric: view: views]]; }  

Should I do anything to fix this?

You need to remove visual barriers, before other obstacles, if this view is in the storyboard The hindrance is ...


Comments