Search code examples
iosobjective-ciphonestoryboardnslayoutconstraint

Why storyboard constraints are changed automatically?


Friends my project is in ending state ,but even in my backup all constraints are changed i,don't know how and why ,but if i run all is available but in storyboard can't see any thing.

it is storyboard image :

enter image description here

it is simulator image :

enter image description here

how i have to solve this ,i need my previous constraints how its changed automatically ?


Solution

  • No issues, you can get your storyboard clean and restored.

    1. Goto your storyboard, select the particular view controller/ table view controller.
    2. Choose the file inspector on the right side, goto Interface Builder Document section uncheck Use Size Classes
    3. Proceed by choosing Disable Size Classes option from the dialog popup. Find that all your views have been visible now, and there is the possibility of constraint warnings.
    4. Click on the yellow mark to the right side of your view controller, update the constraints one by one.
    5. At the end, your previous viewcontroller/tableviewcontroller state is restored.

    If you have more than one viewcontroller/tableviewcontroller has this problem, do the above steps for all.

    Note: Don't forget to check the Use Size Classes back.

    Happy coding :)