Archive for 2009
Own an iPhone or iPod touch? I Could Use Your Help To Test a Streaming Video App
Cartoons to Go is a streaming video application that plays vintage cartoons (from 1920′s through 1950′s). Recently there have been a handful of comments about the application not working as expected. I am looking for 10-15 people who own an iPhone or iPod touch to give the application a try. I’ll create a build specifically [...]
Accessing iTunes Reports When iTunes is Closed
Over the holiday Apple shutdown iTunes: Even though you can’t use iTunes to upload new apps, change current app descriptions, prices, etc, you can access your reports with the following link: https://itts.apple.com
NSRange and NSString Objects
When poking around NSString methods you’ll find many references to NSRange, which is nothing more than a C structure that is helpful for describing a series of items, including a starting location and a count. For example, a range is helpful to extract a substring from another string, where you specify the starting location and [...]
Cartoons to Go! iPhone Application – Version 1.2
Back in mid-November I posted about a personal iPhone project, Cartoons to Go!. In early December I submitted the 1.1 release which included a major overhaul to the UI going with a retro-TV interface as shown in the figure below:
Compare NSString Objects (Updated)
This tip is for those new to Objective-C and Cocoa and walks through some basics on comparing NSString objects for equality. Compare NSString objects with == NSString *str1 = @"Homebrew"; NSString *str2 = @"Homebrew"; // This compares the addresses of the string if (str1 == str2) NSLog (@"str1 equals str2"); else NSLog (@"str1 does [...]
Show Your Support for iPhoneDeveloperTips.com
Since launching iPhone Developer Tips back in August of 2008, there have been almost 200 tips, tricks and tutorials posted, an average of just over 12 posts per month. The number of page views on a monthly basis is pushing 70,000. All things considered, not too bad… My primary motivation with this blog is to [...]
Get iPhone Device Name, Unique Device Identifier (UDID), OS and Model
The iPhone SDK includes a singleton of class type UIDevice that you can use to retrieve device specific information (this works equally as well with the simulator). Available Properties in UIDevice uniqueIdentifier – identifier guaranteed to be unique for every device name – arbitrary name found in General > About setting on device systemName – [...]
Tell Xcode Not to Compile a File
By default, when you create a new file or import a file into Xcode, if the file type is recognized as a source file (.c, .m .js, etc), the file is added to the Compile Sources folder in the application target. You may not always prefer this default action – for example, if a JavaScript [...]
Gotcha: Case Sensitive PNG Filename
Here’s one that will trip you up if you aren’t careful…look at this code: timerButton = [[UIButton alloc] initWithFrame:CGRectMake(104, 410, 50, 50)]; // Notice the filename "timer.png" [timerButton setBackgroundImage:[UIImage imageNamed:@"timer.png"] forState:UIControlStateNormal]; [timerButton addTarget:self action:@selector(buttonPressed:) forControlEvents: UIControlEventTouchUpInside]; [self.view addSubview:timerButton]; Simple enough, create a button, use the image timer.png for the normal state, and [...]
Detect Taps on UITabBarController and Determining Class Type
I’ve been working on an application which uses a UITabBarController as the primary means of navigation. One of the tabs leads one to a UIViewController that displays a UIWebview as the main user interface. The browser based navigation in the webview is based on a legacy (read WAP) website that has a great deal of [...]
Playing Sounds/Audio – AVAudioPlayer
I previously wrote about using Audio Session Services which offers a quick and easy approach for playing short sounds. However, there are a number of limitations, including no control over the volume, playing time is limited to 30 seconds and the only file types supported are AIFF, WAV and CAF. Sounds with AVAudioPlayer AVAudioPlayer offers [...]
Fade Transition – Fade Images In and Out
Although the iPhone includes a number of effects designed for transitioning between views, sometimes a simple fading effect of one image to another, within the same view, is all you need. For example, in a recent application during the application startup, I wanted the splash image to fade away, and another image of the primary [...]
UIAlertView and Landscape Mode
I bumped into a rather odd UI issue early last week – I was working on an application which runs entirely in landscape mode. However, when I displayed an alert view, it came up as follows: Setting Landscape Mode In my application, I had the following interface orientation setting inside the info.plist file:
Book Giveaway: Head First iPhone Development – Winner Announcement
Each Friday in November, O’Reilly and iPhone Developer Tips is giving away an eBook copy of O’Reilly’s Head First iPhone Development. Winner for this week This weeks winner is Woongcheol Yang, congratulations Woongcheol! Woongcheol is from South Korea and is currently a computer science major at Princeton University. Mostly interested in developing web applications, Woongcheol [...]
Does iPhone Support Camera and Recording of Video?
This is the final tip in a series of four that is based on content from the O’Reilly book Head First iPhone Development. O’Reilly and iPhone Developer Tips are collaborating to give away a free ebook (electronic copy) of Head First iPhone Development each Friday in November. You can register in this weeks drawing by [...]








