Skip to content

Category Archives: Code

A Pattern to Declare an Objective-C Mix-in

Sunday, October 9, 2011

The missing piece for creating a full fledged mix-in, or multiple inheritance, language out of Objective-C was the addition of associated references. My earlier post on creating a category that uses associated references is an example of the basic framework to do so. All it was missing was a formal way for the compiler to [...]

Also filed in DDG, Objective-C | | Comments Off

DDGActivity: An Example of Using Associated References

Monday, September 26, 2011

Object oriented languages have always allowed a programmer to add both methods and ivars to any class. Apple recommends you should not over-ride some Cocoa/Cocoa Touch classes. Hence, you cannot use inheritance to add ivars and methods to those classes. Of course, Objective-C has always offered the category mechanism as a way to add arbitrary [...]

Also filed in DDG, iPad, iPhone | | Comments Off

DDGPreferences: A Class for all Settings

Saturday, August 27, 2011

Almost every iOS application has individual user preferences. Some apps also use Apple’s Settings app, some don’t. If you develop many different applications, as I do in my development consulting practice, it is tedious to code up a custom preferences class for each app. My class, DDGPreferences, is an attempt to minimize the tedium by [...]

Also filed in DDG, iPhone | | Comments Off

Core Data Lessons Learned.

Thursday, September 2, 2010

The lessons I’ve learned about using CD are pretty simple. 1) Retain the minimum CD items as necessary to run your app. The CD row cache and fetch requests appear to be quite performant. Rebuilding fetches allows the system to dump memory as needed. 2) -save: is your friend. -save: early and often. Sometimes this [...]

Also filed in iPhone | | Comments Off

DNS-SD Configuration “Gotcha”

Sunday, January 3, 2010

weLost™ uses DNS-SD, DNS Service Discovery, to bootstrap the location of its social network servers. While this was a good idea, it had a very subtle “gotcha” in its configuration. The basic configuration instructions are described here in: Static Server Setup. If you do not intend to support browsing for your resources, then things are [...]

Also filed in DDG, iPhone | | Comments Off

Network Reachability

Monday, December 28, 2009

If you write an iPhone application that uses the network, then you must check if the network is both operating and that your server is reachable. Apple has and will continue to reject applications that do not test reachability. To this end, Apple provides iPhone developers a sample application and class, Reachability, that can easily [...]

Also filed in DDG, iPhone | | Comments Off

SQLite Persistent Objects

Friday, October 23, 2009

I use Jeff LaMarche’s and his contributor’s SQLite Persistent Objects library in my upcoming iPhone application. This library was created before version 3 of the iPhone OS was released. Because iPhone OS v3 contained Core Data, Jeff and his contributors ceased further development. Yet, I was dependent on it and, hence, I continued private development. [...]

Also filed in DDG, iPhone | | Comments Off

RHView and Delegate Drawing…

Saturday, October 10, 2009

The delegate drawing pattern implemented by a RHView is not a decorator pattern. It is a simple delegate pattern. I intend you, though, to use it somewhat differently than a traditional delegate. A traditional delegate would be responsible for drawing directly in the RHView. And, of course, you can use it that way. I use [...]

Also filed in iPhone | | Comments Off

Coordinate Systems and the iPhone…

Sunday, September 6, 2009

Interesting iPhone apps draw custom views/widgets. Every platform though makes assumptions that will be good for some applications and bad for others. As the Mac OS X evolved into iPhone OS, one of the graphics assumptions changed — the handedness of the drawing coordinate system. In Mac OS X’s case, the right handed coordinate system [...]

Also filed in iPhone | | Comments Off
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.