I finally found the time to try out some of the exercises in iPhone App Development: The Missing Manual, with Interface Builder and the iPhone Simulator. (For some unknown reason if I try to select an iPhone 4 as the imaginary device, I get this enormous screen, taller than the height of my iMac's monitor, with a tiny little Home Button! Must be something to do with the resolution of the iPhone 4's display.) It's all following step-by-step directions, of course, but after that I started tinkering with the code for the project, just to see what would happen, and it seems I might just have picked up enough to kind-of, sort-of get by.
At least, I knew enough to get stuck on was why it was necessary to do this...
float midValue = mySlider.minimumValue + ((mySlider.maximumValue - mySlider.minimumValue) / 2.0f);
mySlider.value = midValue;
...to set the Slider at the halfway point at startup. I dunno, it seemed redundant not to take the Maximum Value and just, you know, divide it in half. But then I started plugging in other combinations of numbers, and it all began to make sense as a more foolproof method of arriving at the middle.
I tinkered with the Interface Elements, too, changing sizes and colors and elements, moving stuff around, and whatnot. I'm not sure why anyone would want to do most of what you're able to do — but it's early days yet.
29 August 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment