Add Constraints

Adding constraints to elements in your app helps your app look consistent between different devices that run iOS.  You can have a button that is centered in an iPhone 6 and is also centered in an iPad Pro.  You can also have that button be centered depending on if you are viewing in portrait vs. landscape mode.

Add Constraints

In your project, select the element to which you will add constraints.  You can select it in the view controller navigation on the left side of Xcode.  See it below, the button is highlighted.

Screen Shot 2016-09-06 at 12.06.00 PM

Next click on the bar graph button on the bottom right of the view board.  You can see a menu pops up.

Screen Shot 2016-09-06 at 12.06.12 PM

Then you can click both Horizontally and Vertically in Constraint buttons on the left, then click the bottom button that says “Add 2 constraints”

Screen Shot 2016-09-06 at 12.06.29 PM

Now your element is both vertically and horizontally aligned!  Pretty neat and pretty easy!

What Makes a Good App?

I’ve been brainstorming new app ideas and I’ve been coming up with a list of qualities that makes for a good app.

  • Thumb/finger friendly buttons
  • Doesn’t use up all my battery life
  • Doesn’t use up all of my data
  • Runs fast enough that I don’t give up and switch to something else
  • Does something that would be harder to do without the app —> MAKES LIFE EASIER

I feel like that last point is where we get hung up as app developers.  It’s fun making apps!  It’s fun adding functionality!  But is it easier to do whatever it is we are doing on the app than it is on the website or using some other tool.  That’s the real pickle we’re in.