Archive for March, 2010
iOS Developer Tips - Visitor Stats:
|
|
|
Read Files from the Application Bundle
Below are a few lines of code to get you started if you need to open and read a file that is stored in the application bundle. Files could be anything from help text that your application displays to specific content that facilitates testing. As an example of the later, often times I find it [...]
Overriding NSObject Description Method
No doubt NSLog is your friend, I use it frequently to print messages to the console during development. Actually, I use a variation of the NSLog that prints messages to the console sans date, time and object information, you can read about my approach here: Yet Another Debug Output (NSLog Replacement) In this tip I’ll [...]
Voices That Matter iPhone Developers Conference – Free Pass Winner Announcement!
Voices That Matter and iPhone Developer Tips are happy to announce we have a winner in the drawing for one free pass to the iPhone Developers Conference in Seattle, Washington! Voices That Matter is a two-day event that presents sessions covering the latest and most intriguing technology in application development for the iPhone and the [...]
Change Company Name from Within Xcode on a Per Project Basis
A common question for most anyone new to Xcode is how to change the Company Name that is added to each new source file. The default information looks similar to the following: Copyright (c) 2010 MyCompanyName. All rights reserved. Up until Xcode 3.2 to change this value you had to resort to running a command [...]
Using #error and #warning Compiler Directives
Although not your everyday directives, #error and #warning definitely have there place. Let’s take a short look at a few examples where you might find these directives helpful. #error When the preprocessor runs into the #error directive, it will write an error to the console and generate a compile time error. You can also include [...]
Comment Out Large Blocks of Code with Nested Comments
In working with a large chunk of code recently, I needed to comment out a sizeable block to verify something was working as expected. My first thought was to simply to embed the offending code within /* and */
Storing CGPoint, CGSize and CGRect in Collections with NSValue
In an earlier post CGRect, CGSize and CGPoint Functions I demonstrated a number of geometry structures available for representing a point (CGPoint – x and y coordinates), size (CGSize – height and width) and rectangles (CGRect – combination of both). Unfortunately, you cannot directly store any of the above in a collection, for example an [...]
Yoda Soundboard App Now Available
If you are a Star Wars fan, check out the most recent app I wrote in collaboration with AZOMOB, THQ and Lucasfilm: Star Wars: Yoda Soundboard. It expands on the idea of the original Star Wars Soundboard, this time with two screens of sounds that you can swipe between. The original Star Wars Soundboard looks [...]
Voices That Matter iPhone Developers Conference – Enter in the Drawing for a Free 2-Day Pass
I previously announced that Voices That Matter is hosting another iPhone Developer Conference, with this event being held in Seattle, WA. As part of that post, I mentioned that Voices That Matter and iPhone Dev Tips are giving away one free 2-day pass, a pretty good deal as the full admission price is $695. Originally [...]
How to Send Email with Attachments – Example Using iPhone Camera to Email a Photo
In this post: Camera Application to Take Pictures and Save Images to Photo Album, I demonstrated how you can take photos with the iPhone camera and save the captured images to the Photo Album. A reader asked if it would be possible to email the camera image in place of writing to the Photo Album, [...]
Save UIImage Object as a PNG or JPEG File
In an earlier post on saving images from the camera to the Photo Album, a question was posed asking how to save the image to another directory other than the Photo Album. Let’s walk through one way to write a UIImage object, from the camera or otherwise, as a PNG or JPG file into the [...]
Validate User Input in UITextField, with Smarts to Properly Manage Copy and Paste
I’ve written a short character validation method that you can use as a starting point for validating characters against a character set. For devices running iPhone OS 3.x and thus support copy/paste, this code will also validate characters pasted into a textfield, and if invalid characters are found in the buffer, the input is not [...]






