Objective-C

Running a Method After A Delay on iPhone or Mac


Posted in:

In nearly every programming language there is a way to delay a method call. Objective-C is no different. They have built in a few simple methods to achieve this. We are going take a look at one of these methods today, all which reside in NSObject. This means any class you create will have the ability to call these methods. The method we are going to take a gander at is - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay, got the love the Objective-C method names.

Read More Icon Read More

Loading Images Asynchronously on iPhone using NSInvocationOperation


Posted in:

The iPhone SDK often makes doing things very easy, as long as you know where to look. Loading an Image into an UIImageView is one of these things. The problem I ran into, however, was that loading the image took too much time when performing the operation synchronously. To my surprise it wasn't much harder to load the image on a background thread. This was easily accomplished using NSOperation, specifically the prebuilt subclass NSInvocationOperation.

Read More Icon Read More

Using Shark to Performance Tune Your iPhone App


Posted in:

Here was the problem: we were working on an OpenGL iPhone game and for some reason the frame rates were unusually low - especially for what little action was happening on the screen at the time. My first plan of attack was to begin commenting out chunks of the system in an attempt to see what module was causing the problem. I removed the physics, the logic updates, and some of the things being rendered. Nothing I did, however, seemed to create a noticeable improvement in performance.

Read More Icon Read More

Finding Memory Leaks in iPhone Code


Posted in:

The video tutorial below shows how to use the performance tools that come with the Apple development kit to find memory leaks in Cocoa and Cocoa Touch code.

Read More Icon Read More

iPhone Tutorial - Searching the Web with the Bing SDK


Posted in:

Microsoft recently announced a new SDK for Cocoa and Cocoa touch applications that would easily allow developers to perform various searches using their new Bing "decision" engine. As a person actively working on iPhone applications, this is something I had to try out. This tutorial will introduce you to the Bing SDK and how to use it to build a simple web search application.

Read More Icon Read More

Building an Earthquake Monitor for iPhone using MapKit


Posted in:

The iPhone has plenty of neat features to use, one of the more recent features is using the built in Google Maps support. The specific SDK library we are looking at is MapKit.

Read More Icon Read More

Using SQLite on the iPhone


Posted in:

Most of the time, your iPhone application data storage needs will be taken care of by simple object serialization and flat file storage. However, there comes a point when that type of storage just won't work anymore - when you start storing thousands or tens of thousands of objects. Apple recognized that fact, and so gave app developers the ability to use SQLite inside their applications.

Read More Icon Read More

Create a Basic iPhone Audio Player with AV Foundation Framework


Posted in:

Last week we received an email requesting a tutorial that covers playing sounds on the iPhone. I started digging into the documentation and it appears the SDK offers two choices. Using the AV Foundation Framework, which makes it very easy, or using Audio Queue Services, which is about the most difficult thing in the world. The person in the email mentioned buffers and such, so it is clear that this person wanted a tutorial covering Audio Queue Services. I'll be getting to a tutorial on that in the near future, but for now I'm going to create a simple audio player that should cover most people's needs using the AV Foundation Framework.

Read More Icon Read More

Getting Your Location in an iPhone Application


Posted in:

One of the great features in the iPhone is the ability to get your location, which is available on all of the versions with the 1st edition relying on cell tower triangulation, the rest using built in GPS. As a developer, I can think of endless possibilities for using this information, but the first step is getting a hold of the information. This tutorial is going to cover how to get location data using the iPhone SDK.

Read More Icon Read More

Create an iPhone Application with No Nib


Posted in:

The video tutorial below covers how to create an application without using a nib file. This is a quick tutorial, if you have any question feel free to leave a comment.

Read More Icon Read More

Sponsors