February 2010

Shiny iPhone Buttons Without Photoshop

Screenshot

Newcomers to iPhone development are sometimes surprised at how ugly the standard button controls are. They quickly learn that they need a graphic artist to create a nice-looking button image in Photoshop and then attach that to the buttons. However, in this tutorial, I'll show how to create nice shiny buttons in code, without any image files, by using a CAGradientLayer.

JacksOrBetter for iPhone Updated

JacksOrBetter Screenshot

Version 1.1 of JacksOrBetter for the iPhone and iPod Touch is now available, and it's still free. If you have an iPhone or iPod Touch, you can get it from the App Store.

This version has a lot of cosmetic improvements over version 1.0. Version 1.0 was, frankly, a little embarrassing, and I'm glad I finally got around to fixing it.

I created JacksOrBetter back in September 2008, when the App Store had only existed for a couple of months, and the iPhone App Store Gold Rush was on. The news was full of stories of iPhone developers who were making tens of thousands or hundreds of thousands of dollars from simple games. I wanted in on that action.

JacksOrBetter wasn't intended to make me a fortune; it was my first learning-how-to-write-an-iPhone-app exercise. I figured I'd whip it out, learn what I needed to learn to make and sell an iPhone app, and then I'd get to work on the apps I really wanted to write. (Those other apps are still in the conceptual stage, a year and a half later.)

At that time, there were only a few hundred apps in the App Store, and many were little better than JacksOrBetter. I initially charged $1.99 for it, and after a couple of weeks dropped the price to $0.99. I made about $280 over the next few months. Initially I was selling a dozen or so copies per day, but sales eventually fell to only a few per week, so I decided to make it free.

Since then, I've seen a lot of really nice iPhone apps, and I've learned a lot more about how to make them, so I finally decided to sit down and make JacksOrBetter what it should have been.

So now, it has nicer looking cards, a nicer background, and some cool animations of cards being dealt, discarded, and cleared at the end.

It's still pretty simple, but it no longer has that first-app stink.

There are a few more changes I want to make, but I've got this idea for an iPad app...

iPhone Sample Code: Tiles

As an exercise in using the Core Animation API, I've implemented a little iPhone app that reproduces the behavior of the iPhone home screen's icon reorganization interface. (You know, dragging the wiggly icons around.) You can download my sample code to see how it works. Some descriptions of the highlights follow below.