Posts tagged as: iphone programming

How to Add GPS to Your iOS App – Part 1

June 4th, 2012 Posted by: - posted under:Tutorials - 10 Comments

In Part 1 of this series, I will introduce you to the very basics of CoreLocation services and getting the location of the device currently being used.
About CoreLocation
The CoreLocation framework provides your app with the ability to get a device’s current location, provided the user of the device has granted your app access to that information.
Location services are provided in two major ways using this framework:

Standard Location Services– This service provides the most accurate location information using a variety of …


Disable the iPhone’s Front Camera

August 23rd, 2011 Posted by: - posted under:Tutorials - 4 Comments

The iPhone 4’s front camera is limited to 640×480 resolution. Although handy for video conferencing, for some apps that’s to small to yield a usable photo. Unfortunately the UIImagePickerController class does not have an option to restrict the user from using the front camera. Although you can check the size of the photo after the user is finished, it’s not great user experience to reject it after they go through the entire process of taking a photo.
One option is to …


iPhone Game Programming Series: Blackjack – Part 1: The Deck

September 9th, 2010 Posted by: - posted under:Tutorials - 40 Comments

It has been quite some time since our last iPhone video game series and now we are ready to start a new one. Given the success of our iTennis tutorial series, we will be following along the same line and create a game without using OpenGL ES. If you are interested in OpenGL ES programming, check out , he’s super rad. In this series we will be creating a simple Blackjack game with …


iPhone Coding Snippet: Live Character Counter, Word filter, and 1337 Translator For A UITextField

January 6th, 2010 Posted by: - posted under:Snippets - 22 Comments

I’m sure you have seen a Twitter client such as or count down the characters as you type your Tweet. This is done by responding to the Editing Changed action on a UITextField.

Today, I will show you how you can implement this functionality in your application as well as show you some other real world examples of responding to this action. Here are a few of the uses that we will discuss:

  • Countdown of characters allowed – Used when the user is limited by a certain number of characters
  • Word filter – useful in filtering out swear words or other unwanted text
  • Live translator – our example will translate english to :)

I will create the core code and show you how to modify it slightly to implement the other 2 applications.


UITextField – A Complete API Overview

January 4th, 2010 Posted by: - posted under:Tutorials - 29 Comments

The UITextField is probably one of the most commonly used UI controls on the iPhone. It is the primary method of user input via the keyboard and provides a great deal of additional functionality.
With the success of our las API tutorial on NSArray, I thought I would do another walkthrough, this time on UITextField. I will be explaining all of the properties for it as well as bringing up some functionality that you may not have known about.
Text Attributes
The …


iPhone Programming Tutorial – Using openURL To Send Email From Your App

February 20th, 2009 Posted by: - posted under:Snippets - 98 Comments

Have you been curious about how to open from your applications to send contact email? Today, I will be teaching you how to do just that. We will even be pre-filling the subject, to line, and body of the email.
This is a great way to to put a contact or bug report button on your app. I’m going to start with a simple UI that I created. I’m not going to discuss how it was created …


iPhone Programming Tutorial – Animating a Ball Using An NSTimer

October 28th, 2008 Posted by: - posted under:Tutorials - 91 Comments

I have noticed recently many people wanting to create games for the iPhone and are unsure where to start. A common misconception is that you must use OpenGL ES to create any game with graphics. I am going to show you today how you can do some simple animation by moving a ball around the screen. We will not be using OpenGL ES to move the ball. We will simply be using an NSTimer and a …


iPhone Programming Tutorial – Using UITouch To Drag An Image Around The Screen

October 20th, 2008 Posted by: - posted under:Tutorials - 64 Comments

In this tutorial, I will be showing you how to use UITouch to get the location of where a user touches on the screen. We will be using this knowledge to drag a UIImageView around.
Learning how to use UITouch is the first steps in creating applications that are not navigation based (or don’t only use Apple’s built in components. Later on, we will begin some basic game development that will utilize UITouch.
You will need this image for the …


UITabBar iPhone Tutorial

September 28th, 2008 Posted by: - posted under:Articles - 72 Comments

This tutorial will show you the basics of using the UITabBar and UITabBarItem controls when programming for the iPhone.
I will be showing you step by step in the video how to create a project from a UITabBar template and add additional UITabBarItems as well as additonal views to be displayed with these items. Here is a brief explanation of each step:
1. Create a new project from a UITabBar template
This is pretty straight forward. We will be using Apple’s …


Video Tutorials Coming Soon

September 23rd, 2008 Posted by: - posted under:Articles - 20 Comments

Thanks to the generous donations of iCodeBlog users, I am pleased to announce that I will start doing some video tutorials starting early next week (or later this week if I have time). I have purchased iShowU HD Pro ScreenFlow and this will allow me to do screen casts of me writing the programs. From there, I will be able to overdub my voice, giving instruction every step of the way.
What is so good about this?

Tutorials will …