Question

I am developing an app in iOS7.

I am having login page and then the dashboard page in my app.

but i want to use Auto Layout only in my login page and not in dasboard.

I have tried doing check and uncheck in the file inspector view but not able to set .

my problem is when i uncheck Auto Layout option in dashboard Xib.......automatically.....login page xib is also uncheck and vice versa?

and to move from one scene to other i am using segue

can any one help me out with this?

thanks in advance.

Was it helpful?

Solution 2

Since you mentioned a segue, I assume that you are using storyboard, yes?

For storyboards, the setting to enable or disable autolayout applies to the entire board. You could instead use two storyboards and have a different setting for each, but then you can't use segues but would need to instantiate your viewcontrollers in code.

Having said that, just because you have autolayout enabled, doesn't mean that you have to use constraints in each view. By default, views have setTranslatesAutoresizingMaskIntoConstraints enabled, which means that you can use frames for the most part.

OTHER TIPS

If you're using Storyboards then you can't set Auto Layout for only one scene. It's all or nothing.

Edit

But if you have the 'Use Autolayout' checkbox set to YES this doesn't mean that you're "forced" to work with Auto Layout in every scene. You can just ignore adding constraints for that scene and work with frames.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top