Previously, Apple made only one screen size for the iPhone. Today there are many different sized iPhones and iPads. Moreover, many apps support landscape mode as well.
If you try running the apps you created so far on different simulators, you'll notice that the alignment of your UI objects is different than what you designed. For example, try running your last project on different simulators ranging from iPhone 5s to iPhone 8 plus. You'll often notice objects that are off-center. Sometimes the objects shift left, and sometimes they shift right depending on the size of the iPhone or iPad you're trying to run it in.
Rather than creating different interfaces for each screen size, Apple came up with a system known as auto-layout. Auto Layout is a system of constraints, or UI rules, that govern the size and position of elements on the screen.
Let's see to how use auto-layout to make sure your apps look good on all the devices, regardless of the screen-size.