Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
We've looked at the Browser template and we've looked at the RSS template. Now, let's look at the Utility template because this allows us to move on based on what we've seen and we've seen an awful lot about Dashcode and building iPhone web apps. But let's move on and see what we can do here because this brings in some additional pieces of functionality. We only want the iPhone version, so let's create it now and the first thing that I do whenever I'm experimenting with a new template is to run it to see what it is that I have. It's loading and, lo and behold, you can see I've got one of these dashboard-like widget buttons that flips the widget. Remember, I showed you Dashboard and I'm using the F12 key and those are 2-dimensional and there's this little "i" on the front that lets me flip it around and I can use settings on the back. Notice here, I can change fonts, I can change sizes. When I'm done, I can flip it around so I can go back and forth from one side to the other, but the functionality is on the front. I click here and I get a keyboard and this is editable. I can come up here, take out the text above it. So what this template, the Utility template, is doing is it is the first one that we've looked at that explores the use of the keyboard and text entry into iPhone app widgets and when I'm done with that, I can quit it now and come back. That's done with editing, I can flip it around. I'm going to change it so that I'm using a Helvetica font in red. You finish that and then I can flip it around to the front and you can see the font and the style have changed as well as the color. So, this is an app that deals with text input and settings and we'll take a look to see what more we can do with it as we explore what else is built into this template. So let me stop the simulator and we're looking at it here. Let's take a quick look through what is in the template and we've got 2 views: we have the front and the Settings, which is back. In the front, I have a background and you could see the highlights here. The title is the word Utility. The message area is where I can type and the Info button down here is the button that flips it. On the back, on Settings, I have the Header and I can expand that and you can see I've got the done button and the Title. I have the Settings Group and this is an example of a view being used as an organizer, as a container for other objects. So, I've got the font family title, the font family itself, the size, title, the size, the color. I have color chips here; notice how they're changing. And this check mark here indicates which of the color chips is in use. The Clear Settings button here is the Reset button and the footer down here is developed with Dashcode. And if you recall, when we talked about the Inspector Window, we talked about behaviors and items with this little cube here. Same as this little cube are items that have behaviors attached to them. So that, for example, font size here has an unchanged event that is intercepted and it will process that. The color chips process the handler when it's clicked on it. I will change the color and Done up here is the button that will flip it around to the front and as you will probably not be surprised, the Info button on the front has a behavior attached to it which flips to the back of the widget. So, this is a widget that is fairly heavy on behaviors and it enables user input. So, let's explore it now.
| Course: | Developing iPhone Web Apps |
| Author: | Jesse Feiler |
| SKU: | 34075 |
| ISBN: | 1-935320-89-0 |
| Release Date: | 2009-12-31 |
| Duration: | 8 hrs / 103 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |