Posted on by & filed under Content - Highlights and Reviews, Programming & Development.

A guest post by Lou Franco who runs Atalasoft imaging and PDF toolkit development for Kofax, and has been a mobile application developer for over a decade.

If you’ve never programmed in Objective-C (or at all), don’t let that stop you from trying to get your great application idea into the App Store. If you keep your idea focused, sketch it out beforehand and break it into small tasks, you’ll be able to handle the coding.

Here’s a simple example. Let’s say you wanted to make an application that lets you take a picture with the camera, circle an interesting part of it, and then email it. You could use an application like this to start a new Social Network around sharing pictures of cool hats, cute puppies, or the most delicious donuts.

Here’s a sketch:

safari-helloios

To make that camera button bring up the camera, this is all you need to do:

The first line of code creates the GUI screen that knows how to get images from the camera. The second tells it that you want to be notified when a picture is taken, and the third starts the process — with an animation! iOS takes it from there and eventually notifies you. You can handle that like this:

The first line gets the image from the picker and the second puts it into your image view. The last line removes the camera screen and then shows your original one again.

You could save the image to the users’ albums with:

You can draw a circle on it with a custom view. The hardest part of that is just:

Just get the drawing context, set the color to red, add an ellipse and draw it. You can do all kinds of custom drawing this way, including text, gradients, images or whatever you want.

Sending an email is a lot like taking a picture, but instead of using a UIImagePickerController, you use a MFMailComposeViewController, and you can attach the image like so:

There’s a little more to it, but each small feature is usually just a few lines of code.

The secret to making an application is to start out with sketches, organize the functionality you want so you have a plan of small steps, and then tackle each one. Keep completing the cycle of sketching, designing and coding until you are done. Once you have the basics mastered, you’ll have an application in the store in no time.

See below for some iOS resources from Safari Books Online.

Read these titles on Safari Books Online

Not a subscriber? Sign up for a free trial.

Hello! iOS Development is a tutorial designed for novice iOS developers. Using the Hello! style of User Friendly cartoons and illustrations, this entertaining book will guide you step-by-step as you write your first applications for the iPhone and iPad and add them to the AppStore.
Learning iOS Programming, 3rd Edition will teach you how to develop your first marketable iOS application, from opening Xcode to submitting your product to the App Store. Whether you’re a developer new to Mac programming or an experienced Mac developer ready to tackle iOS, this is your book. Updated for iOS 6 and Xcode 4.
iOS Hacker’s Handbook covers iOS security architecture, vulnerability hunting, exploit writing, and how iOS jailbreaks work. It also explores iOS enterprise and encryption, code signing and memory protection, sandboxing, iPhone fuzzing, exploitation, ROP payloads, and baseband attacks.

About the author

lou-franco Lou Franco runs Atalasoft imaging and PDF toolkit development for Kofax, and has been a mobile application developer for over a decade.

Tags: App Store, camera, iOS, Objective-C, Social Network,

Comments are closed.