From the course: iOS Development: Auto Layout Programmatically

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Dynamic trait changes on iPhone

Dynamic trait changes on iPhone - iOS Tutorial

From the course: iOS Development: Auto Layout Programmatically

Start my 1-month free trial

Dynamic trait changes on iPhone

- [Instructor] The layout we have here is great for iPhone and portrait and in this 1/3 pane, but if we screwed it all the way back. This isn't the best format I'd want to use for an iPad, or for that matter, an iPhone in landscape. In iPhone landscape and iPad, I'd like to have the buttons vertically on the right side of the screen. This isn't as easy as it sounds and I'll make the warning now, we are headed into some deep technical waters here. You need to address two problems with constraints. The first is not adding any conflicting constraints. You must only replace a constraint. You must replace the pin between order button trailing and back button leading with one between order button bottom and back button top. That's the second problem. The first is not adding any conflicting constraints. You must replace a constraint. You must replace the pin between order button trailing and back button leading with one between order button bottom and back button top. That's the second…

Contents