3

I'm trying to enable autolayout by clicking on 'Use Auto Layout' on following option in storyboardenter image description here

but after a while, it just appears a lock on screen indicating it is not possible, and checkbox is never selected

enter image description here

how to enable it properly?

Jesús Ayala
  • 2,743
  • 3
  • 32
  • 48

4 Answers4

2

Enable "Use Trait Variations" too, It will enable "Auto Layout" automatically.

enter image description here

Satish Mavani
  • 4,897
  • 2
  • 20
  • 30
0

Enable "Use Auto layout" from 1 option of storyboard as shown in image below.

enter image description here

sschunara
  • 2,285
  • 22
  • 31
0

The lock appears when you try to change any property because the viewcontroller that is selected is locked. To enable editing select the viewcontroller from storyboard and goto Identity Inspector tab from Inspectors pane and set the Lock option to Inherited(Nothing) or Nothing

Attached is the screenshot for better understanding. enter image description here

Najeeb ur Rehman
  • 403
  • 4
  • 11
-1

I knew finally how!!! I had to select on Project Navigation my .storyboard file and then go to:

Editor -> Localization Locking -> Reset Locking Controls

and now I can select Autolayout

Jesús Ayala
  • 2,743
  • 3
  • 32
  • 48