Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Color in iOS 7 UI

From: iOS 7 SDK New Features

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.

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.

Show transcript

This video is part of

Image for iOS 7 SDK New Features
iOS 7 SDK New Features

26 video lessons · 3925 viewers

Simon Allardice
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.


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.

Join now "Already a member? Log in

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
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.