iPhone Game Development - Chris Craft [162]
Tip
You can find the source code for Flickr KML at http://appsamuck.com/day8.html.
Day 9: Snow Fall
If you're looking for an application that will spread seasonal cheer, Snow Fall is for you. This application uses the image of a single snowflake and repeats it on the screen as multiple flakes falling down the screen. It's a great app if you're experiencing winter-weather withdrawal or if you just love to watch the snow fall. The beautiful white-and-blue design of this app will remind users of winter all year long. We started the 31 days of iPhone applications in October, and while it had not snowed yet, it was starting to get cold, and all the stores were displaying Christmas-related goods. We came up with the idea of creating a virtual snow shower, and from there we created Snow Fall.
You learn how to use Quartz animations in your animations, timers, random number generators, and more. You also learn more about utility applications for iPhone with Xcode.
Tip
You can find the source code for Snow Fall at http://appsamuck.com/day9.html.
Day 10: Where Am I?
Are you an avid hiker, backpacker, back-country explorer, or just simply an adventurer? Have you ever been stranded in a remote location and needed to communicate your exact location in order to be rescued? Ever been walking down the street and wondered, “Hmm, I wonder what my exact location is at this very moment?” The Where Am I? application uses the GPS device in your iPhone to pinpoint your latitude, longitude, and even altitude. Some developers tend to seek out the hardware features of their devices. It was not long before we did the same. Both the GPS and the accelerometer are exciting features of the iPhone. We wanted to learn more about them, and by the end of the day we had created the Where Am I? application.
You learn how to use GPS to access longitude, latitude, and altitude. Learn about UIButtons and UIImageViews and how to access the hardware capabilities of the iPhone in your app.
Tip
You can find the source code for Where Am I? at http://appsamuck.com/day10.html.
Day 11: Plumb Bob
The Plumb Bob application helps ensure straightness in carpentry, masonry, and other jobs or projects. The Plumb Bob is a plummet, or weight, that is suspended by a string and used to check that lines are vertical. The application must be turned on and then lined up with the object in question. If the string on the iPhone is straight, it ensures that the object is straight. If the object is not straight, the application shows that. We like that the iPhone has replaced many other common devices that people tend to carry around with them, such as calculators, notepads, and cameras. But what other tools could we replace with an iPhone application? That's why we created a virtual plumb bob.
This application teaches the basics of working with the accelerometer. The code also uses UIImages, UIImageViews, rotation transforms, and more.
Tip
You can find the source code for Plumb Bob at http://appsamuck.com/day11.html.
Day 12: U Decide
If you have trouble making decisions or finding the right answers to questions, you'll love the U Decide application. It has an easy-to-use interface, and responses are clearly shown at the top of the iPhone screen. This app handles simple decisions that involve answers of yes/no, true/false, and others; but it's also capable of helping users decide between more complicated options. For example, a user can select that the answer be a number from 1 to 100 or a buy/sell/hold decision. Other options include A/B/C/D responses, left/right/center responses, and more.
The biggest focus of U Decide is creating and working with random numbers. All decisions are made using randomly generated numbers. There are also a lot of IBActions, UIButtons, UILabels, and more.
Tip
You can find the source code for U Decide at http://appsamuck.com/day12.html.
Day 13: My Google
Enjoy the Google application on your iPhone