iPhone Game Development - Chris Craft [166]
Tip
You can find the source code for PhotoFrame at http://appsamuck.com/day27.html.
Day 28: DigiClock
DigiClock is a plain-and-simple app that gives you the feel of an old-school alarm clock that you've grown to love over the years. The digital clock is nothing extravagant, just easy to read from any location.
This tutorial covers basic image animation techniques and a touch of transparent images.
Tip
You can find the source code for DigiClock at http://appsamuck.com/day28.html.
Day 29: Password Generator
With all the passwords we create today, it's no wonder every developer tries to create the next great password generator. Here is our attempt to do just that. Tell Password Generator whether you want to use numbers, upper- or lowercase letters (or both), and punctuation symbols; specify the length of your desired password; and then touch Generate Password to create a new, completely random password. For extra safety, Password Generator can show the phonetic expansion of your password, reducing the chance that you will mistake a 0 for an o or a number 1 for a lowercase L. Using Password Generator makes it much more difficult for hackers to crack your password-protected account.
In this application you learn about skinning a UIButton and working with many of the built-in iPhone UI controls, and there's content on basic animations and random numbers as well.
Tip
You can find the source code for Password Generator at http://appsamuck.com/day29.html.
Day 30: DeathCalc
Just in time for Halloween, we created the DeathCalc, which comes with some bad news: It's designed to tell people the statistically most likely date of their demise. It even calculates your time left in seconds so you can watch them ticking away. This is a fun app that is great to show off and impress your friends with. Everyone will want their information to be entered to see when their time will come. Don't be surprised if you start looking at time in a whole different way!
There is a strong focus on working with UI controls and data calculations in this application, and there's some good material on using strings.
Tip
You can find the source code for DeathCalc at http://appsamuck.com/day30.html.
Day 31: Moolah
Recession? Depression? Forget about it! Feel better about life with this app that rains money on you. If you've always wanted to swim in money—and who hasn't?—Moolah is just what you need. For our final application we wanted to create something with some nice special effects. We decided on Moolah with its screen full of money. Many of us hope we can strike it big with our mobile apps and have the money just rain on us. Have fun with this entertaining app.
This is a full-featured app that was previously rejected by the App Store. It has been resubmitted with the enhancements that are included in this example.
Tip
You can find the source code for Moolah at http://appsamuck.com/day31.html.
Glossary
accelerometer The iPhone responds to motion by using a built-in accelerometer. This is used to detect any changes in orientation, such as when you rotate the device from portrait to landscape. This feedback can be used in applications in many creative ways. For instance, the accelerometer makes it possible to react to shake gestures or to move objects on the screen when the device is tilted.
alpha channel Images that have an alpha channel are images that have transparency information stored in them. Many image formats support alpha channels, and this is a great way to create advanced graphics and user interfaces for your iPhone applications.
animations The UIImageView supports using a series of images as an animation. This is a great effect that is very easy to use and always makes an application stand out.
application An application (app for short) is a computer program that executes on a device utilizing the features of the device to perform a task for, serve as a reference for, or entertain a user.
Application Programming Interface (API) An API defines a