Posts tagged as: iPhone Coding

Disable the iPhone’s Front Camera

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

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 …

August 23rd, 2011 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

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

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
secret-of-blackjack

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 Jeff Lamarche’s blog, he’s super rad. In this series we will be creating a simple Blackjack game with the following …

September 9th, 2010 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

iPhone Coding – Turbo Charging Your Apps With NSOperation

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
iphone

So, let’s face it, MANY applications in the app store are “Clunky”. They have jittery interfaces, poor scrolling performance, and the UI tends to lock up at times. The reason? DOING ANYTHING OTHER THAN INTERFACE MANIPULATION IN THE MAIN APPLICATION THREAD!

What do I mean by this? Well, I am essentially talking about multithreading your application. If you don’t know what is meant by multithreading, I suggest you read up on it and return to this post. Let’s dig in and I’ll give you an example of the problem.

March 4th, 2010 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

iPhone Coding Snippet – Shortening URLs

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
5683url

I had some a to shorten URLs for an in-application Twitter client I’m working on and thought I would share my simple solution with you guys.

It’s actually pretty straight forward and can be done in 1 line of code. I have broken it up into several for clarity.

February 4th, 2010 Posted by: (ELC) - posted under:Snippets - View Comments READ MORE

UITextField – A Complete API Overview

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
UIAlertViewHack

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 …

January 4th, 2010 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

iPhone Coding Tutorial – Creating an Online Leaderboard For Your Games

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

As you may have seen, there are quite a few services out there offering free leaderboards. These are great and all, but sometimes you want to have complete control over your data. I have put together a complete tutorial detailing step by step how you can create your own online leaderboard. This will also give you a very simple introduction to interfacing with web services.

October 29th, 2009 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

Debugging Tutorial – Automating Your Tests With A UIRecorder Instrument

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

If you have ever experienced a bug in your application that took many steps to reproduce, then this tutorial is for you.  By nature, testing and debugging are very tedious processes.  This is especially the case for the iPhone.
Say you have an app that drills down 5-levels deep to some other view.  Now let’s say that you have a bug on that view 5 levels deep.  Your normal method of debugging is:

Run the app
Tap view 1
Tap view 2
Tap view 3
Tap …

October 6th, 2009 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

Code Snippet – Quickly Find The Documents Directory

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

As many of you may have seen by now, there are quite a few ways to find the documents directory on the iPhone.  For those of you who don’t know, the documents directory of an app is the location where you should save your application data.  While finding the documents directory is a trivial task, it is very important when coding most applications.  Apple has provided quite a few ways for resolving the path to this directory.
If you read through …

September 9th, 2009 Posted by: (ELC) - posted under:Snippets - View Comments READ MORE

Objective-C Tutorial: NSArray

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

The NSArray is a huge workhorse that we use quite frequently without even thinking about it. The NSArray class isn’t just your ordinary array. Not only does it provide random access, but it also dynamically re-sizes when you add new objects to it. While I won’t go over every method in NSArray (there are quite a few), I will discuss some of the more important ones that are most commonly used. Let’s take a closer look at this class.

August 26th, 2009 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE

iPhone Programming Tutorial: Animating A Game Sprite

  • Twitter
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks

One thing I have noticed about many of the games in the app store is they lack animation. Of course, the huge companies like Sega and PopCap have some pretty amazing animation, but what about us indie iPhone game developers?

Well, Apple has made it quite simple to do animations. I really feel this method is often overlooked. I will show you in just a few lines of code, how to completely animate your game images. I will walk you through …

July 24th, 2009 Posted by: (ELC) - posted under:Tutorials - View Comments READ MORE