Looking Inside Dashcode / Using the Inspector: Metrics & Text
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.
Learn More
Subtitles of the Movie
Now let's move on to the next part of the Inspector and that's Metrics and as always whatever is selected here is going to be shown here in the Inspector and I've selected, I can select any item and what you will see here is that over here I can see the Dimensions of this Item and it's Absolute position. This Item here I can see, again, the Size and the Position. This Item is not modifiable because it's part of the Template and I'll talk about it later and why this Item has a special status there. But anything here, for instance this little arrow here, I can click on it and I can see over here what it is. If I want to change its size I can drag any of the size boxes here. I can also use the Stepper over here and if you notice as I'm changing it, it's changing over here and also this one row in this particular List is copied to all of the other rows so as I change this one all of the others change and before I forget I'm going to put it back to where it was, which was 8 pixels wide. So, I can move things around either by dragging them or by using these locations. Now, let me move to the other side of this Template because I want to demonstrate what this Layout pop-up means. I can move things around. By default in most cases I have it set to Document flow and that means that as I add a part to this Layout it's very much like a word processing document. Things flow from top down and I cannot put things on top of one another. And I can demonstrate that, if I move this one up here you'll see I can move it above location, apparently, but I can't get it in there because there's nothing - I have to move Location aside and now I can try to move this around and it just isn't working because I've got Document flow turned On. What I want to do in most cases for iPhone Web Apps is to use Absolute positioning. Now I can move things around and I'm putting them wherever I want them. I can bring the Description back up here where it should be; I can put Location on top of it; I can enlarge this so I can see the Description; I can do whatever I want to do because I've got Absolute positioning turned On and I have to turn it on for whatever it is, the container of what I'm using. So I need it here, I need it for the box itself and now I could move - I don't want to move that, I want to mov this item around and so with Absolute positioning I can put things where I want them to be. You can also use Autoresizing and that means that as the containing object is enlarged or reduced in any of these four dimensions the object that I am causing to be Autoresized will move proportionately to the containing object. And again, this is usually something that you are not using in iPhone Web Apps. There are certain cases where you use it, but you definitely want in most cases Absolute positioning and you can use the Size and Positioning either with the handles or with the numbers. You can also Constraint Resizing and we'll talk about that later in special cases, but mostly what you'll be using here on the Metrics tab is making certain that Absolute positioning is set and you may use the actual numbers for positioning things and you'll see that as is the case with most Mac OS X drawing and layouts I have guides that will appear so that I get things lined up, centers, and I can see what's going on there. So, those are the basics of the Metrics tab. The next tab is also a common tab that you're used to in many types of applications and you can change the Alignment, for instance note that Location is highlighted. I can change that to be Aligned Center, or leave it back the way it was with the Left Alignment and this is exactly the same kind of formatting and alignment that you use in any word processing application. I can also set the Characters, I can set the Font, the Style and so forth. I can also use Shadowing - all of those things that you expect from a fully configured page layout or document layout application with the ability to change styles and settings like that. If you use iWork for the Mac and it's only on the Mac, you will notice all of these tools are in iWork. And, in fact, what you are looking at here is an interface to a basic part of the Operating System. Dashcode doesn't implement this setting of Fonts or the Alignment and so forth. That's not done in Dashcode. This is an Interface into a part of the Operating System that performs those operations on the current document, be it a Dashcode document or an iWork document; that's why everything works the same way and that's one of the big features of the Mac. So, those were the Introduction to Metrics and to Text. The last two tabs on the Inspector, which are what are called Bindings and Behaviors, are very specific to what you want to do with the application so we're going to move on and look a bit more at what you can do with Web Apps.
Tutorial Information
| 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: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 