Archive for October, 2008
Date Formatter Examples – Take 1: NSDateFormatter
Sometimes all you’re really looking for is a basic chunk of code to get something done. For example, I was working on an application yesterday and needed to display the current date in text format: October 29, 2008. A simple concept for sure, however, with the many nuances of date formatters, it takes some time [...]
How to Prevent iPhone from Sleeping
The automatic sleep timer is one of the ways the iPhone saves power. If the screen isn’t touched for a certain amount of time, it dims the screen and eventually turns it off. Although you should leave the timer on, there are times when this is not what you want (games are a good example). [...]
How to Get Width/Size/Length of UIString in a Specific Font
If you’ve ever been frustrated trying to find a way to compute the height of a string that wraps you will know my pain. Recently, I discovered that UIKit has made some addition to the NSString class that adds pure magic to the string type. If you lookup the NSString class in the documentation then [...]
iPhone Frameworks from the Omni Group
The Omni Group is the company behind some amazing Mac software. For example, OmniGraffle is a great tool for creating wireframes and applications flows (see this post for related info).
Xcode FIXME and TODO
In a previous post I introduced how to use #pragma mark to help navigate source files within Xcode. There are several additional tags that can be used within a source file to call out specific code or content.
C++ on iPhone: Part 2, Exceptions
In part 2 of this C++ on iPhone series I’ll be exploring C++ exception handling support, and as a bonus I’ll touch on use of standard C++ lib console output stream, as well as showing a way to call C++ code from Objective C. As a reminder, exception handling is normally one of the weak [...]
Launching Other Apps within an iPhone Application
In an earlier post I talked about how to launch the browser from within an iPhone application using the UIApplciation:openURL: method. It is also possible to use this same technique to launch other applications on the iPhone that are very useful. Examples of some of the key applications that you can launch via URL are: [...]
Apple Releases New iPhone Developer Forum
For those of you that haven’t noticed yet, Apple has released a nice improvement over its original forum for developers. Unlike the old customer support forums, this new forum is dedicated to exclusively iPhone Development topics. So far I’ve found it very useful.
C++ on iPhone: Part 1a
Upon completing a followup article to part 1 in this series on C++ for the iPhone, I realized that the article was not really very iPhone specific, and was more of a generic C++ article. That being the case, I’ve rewritten the article and posted on my site here. The article pertains to some interesting [...]
Java Developer’s Guide to String Constants in Objective-C
It is my experience that, when developing a J2ME application, excessive String creation is often the leading cause of memory “leaks”. There is always that step during the development cycle where you go back over all your code and refactor out any strings that should be defined as constants. This is no less true of [...]
C++ on iPhone: Part 1
Much is made of the Objective C programming language when discussing iPhone development. It’s the language of choice, many of the iPhone frameworks are written in Obj-C, etc, etc. Coming from a background of mobile development on other platforms, I was curious about how well C++ is supported on the iPhone. BREW, Symbian and Windows [...]
JSON Framework for iPhone (Part 2)
Editor’s Note: Due to the popularity of this iPhone JSON series, a new three part tutorial series on working with JSON was published in August 2009. You can find the latest JSON iPhone tutorial series at the links below: iPhone JSON and Flickr Tutorial – Part 1 iPhone JSON and Flickr Tutorial – Part 2 [...]
Another iPhone Developer Tips Contributor Joins the Team!
How cool is this, a week ago I announced that Rodney Aiglstorfer was going to be contributing to the iPhone Developer Tips blog, and now, another amazing developer has joined us as well! My friend Steve Wetherill, a long time C++ guy brings a wealth of development experience, here’s a little more about Steve:
Understanding Reload, Repaint, and Re-Layout for UITableView
Leaning the Objective-C language isn’t that bad; the true hurdle in learning to develop for iPhone is in understanding the frameworks. UITableView and UITableViewController is a perfect example of how a developer, new to iPhone, can get lost in a quagmire of documentation. Most recently I found my self looking for a way to tell [...]
Java Developer’s Guide to Static variables in Objective-C
The concepts of “static” variables are different in Objective-C compared to Java. That does not mean, however, that the concepts do not exist. Consider the following common uses of ‘static’ in Java: public static final int MY_CONSTANT = 0; // Constant public static String MyVar = “Foo”; // Class Variable In all of the above [...]








