Start learning with our library of video tutorials taught by experts. Get started

iOS 7 SDK New Features

Color in iOS 7 UI


From:

iOS 7 SDK New Features

with Simon Allardice

Video: Color in iOS 7 UI

Well, some graphical elements like bar backgrounds have become de-emphasized. As you probably noticed, the color is blue You can do this yourself in your own applications And perhaps a button and a slider.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
iOS 7 SDK New Features
2h 14m Intermediate Nov 14, 2013

Viewers: in countries Watching now:

Bring your iOS development skills—and your applications—up to speed with the new options in the iOS 7 SDK, including a new version of Xcode, Xcode 5, and the biggest overhaul to the user interface since the release of the original iPhone. Simon Allardice shows you how to create simpler designs that emphasize the principles of clarity and flexibility in the new UI, and add depth to your apps with translucency and layering. Plus, learn about multitasking, the new Objective-C modules, 64-bit support in the iPhone 5S, and new and updated frameworks for iOS 7.

Topics include:
  • Working with automated configuration in Xcode
  • Using asset catalogs
  • Understanding color and space in the iOS 7 UI
  • Adding and debugging Auto Layout constraints
  • Adding background fetch support
Subjects:
Developer Mobile Apps
Software:
iOS
Author:
Simon Allardice

Color in iOS 7 UI

Well, some graphical elements like bar backgrounds have become de-emphasized. Color has become important than iOS 7 simply because we have removed a lot of other graphical onamentation. A good example is with basic buttons. Whether they are in the main body in your app or in the navigation bar. Buttons no longer have an outline, they're simple colored text or a straight forward simple line icon. But we used to have multiple graphical states for our buttons with different image backgrounds to show if something was being pressed or was active or inactive.

So now we do this through color instead, we can draw attention to whether a button is touchable or if it's worthy of special attention using color. As you probably noticed, the color is blue by default to indicate that something is touchable. And that's what I'd see in Mail. It's what I'd see in settings, or in photos and many other applications. But if I go into a context where there's something that I can't do, say I go into an empty folder, I'll find that the Edit button at the top right is going to get grayed out. That's the hint that this is not touchable.

And this will happen automatically, and it will happen a couple of different situations. If I go into an email that I'm working with and I hit the button to Reply or Forward. We're getting multiple visual suggestions here. Okay. First, we have the pretty normal action appearing with the gray overlay. Over the rest of our content. But if you notice there is more to it than that. The buttons underneath the overlay are not just being faded. The actual color of them has changed. We're not just seeing a darker blue. They've gone to gray again. It's a second level of information that those are untouchable.

They're on the action sheet itself, we're getting our click-able options in blue, although the Cancel one in a slightly heavier font. But that's not only option, if you've use iOS 7 for awhile, you will see some differences, it's not just blue. If you go into Calendar, you're going to see red. If you go into Notes, you'll see yellow, if you go into Game center, it's purple. And there's a consistency to them. It's not one button on one of the bars is red and the others are blue, it's all red. Same if I go into Notes, it's all yellow.

Text buttons at the top, line icons at the bottom. It's a subtle way of theming the application without other graphical information. You can do this yourself in your own applications by using the tintColor property. Now we had tintColor as a property for awhile in iOS, but it used to be on each individual control. Now in iOS 7 it's part of UIView. And the great thing about that, is it's hierarchical, so you don't need to change every single UI Control you're using. Because if you set it on a top level container view like the top window, all the sub-views will automatically pick up that tint color.

But this can be done through code, or it can be done an interface builder. So here, I just have a very straight forward master detail project that I've created. The, the typical project template. I've just added a couple of things to the detail view here about a tool bar with some icons on it, and just to prove the point here, I'm going to drag on a segmented control. And perhaps a button and a slider. These are all right now taking the default tint color, which is the default blue. But what you'll find wherever you are in interface builder, if you go to the normal file inspector for any of the view controllers.

You'll find an entry here for a global tint, currently set to default, but I could pick one of the suggested colors or just go to Other. And let's say here, we'll pick an orange. I can already see the impact that that's had on these items here. That just by setting it in one place, and effectively I've just set it on the window at the top level. That tint color has taken effect on the segmented controls, it's taken effect on the buttons, the sliders, and all the line icons that are embedded inside the toolbar. That tint color will dim by default when you do something like make an action sheet appear, but you can even tweak that behaviour.

There's a tintAdjustmentMode for control of that one. And there's even a tintColorDidChange method on UIView if you need to implement and react to that changing. Going back into the Notes application is one more color example to see. Although this app has had a tint color of yellow, which has taken effect on all the different buttons, whether they're on the tool bar or the top navigation bar. If we hit Delete for an existing note, we're going to get the fairly standard action sheet. And because action sheets often have to do potentially destructive behaviour, and action sheet does not take that tint color on.

And also, it will show any destructive button option in red, another subtle but useful hint for behaviour. But what I can also see here is that color is not our only hint. There's a difference in font weight, too, and that gets us to a few core things we need to understand about how iOS 7 manages text.

There are currently no FAQs about iOS 7 SDK New Features.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed iOS 7 SDK New Features.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked