cocoa: app memory usage
My least favorite part of Cocoa programming is its reference-counted memory management scheme. If you can exclusively target Mac OS X 10.5 or later, then you can use garbage collection instead, which...
View ArticleDrawing NSStrings in unusual rotations
If you’re used to writing apps for desktop computers, the iPhone’s screen can seem awfully small. You must make creative use of every pixel available to you. One way to do that is to draw some text...
View ArticleNSLog() sucks
In a previous installment I explained why printf() sucks, and how I fixed it. Today I am going to focus on NSLog(), which sucks even worse. Why NSLog() sucks Here’s a typical NSLog() call:...
View ArticleiPhone: keyboard trouble
It is possible to type into two or more of these fields without dismissing the keyboard A couple of months ago, a user of my card game reported a bug. He said that when he tried to change the names of...
View ArticleiPhone: UIImage rotation and scaling
Hello to my three remaining blog subscribers! Long time no see! For my first post back after my long hiatus, I’m going to revisit the single most popular entry I’ve written to date, which was about...
View ArticleUIProgressHUD replacement
Dear internet: I have been searching for a UIProgressHUD replacement for many, many months. Why have you failed me? I don’t suppose it was because of that other, similarly named UIProgressHUD...
View ArticleiPhone: nibless
I just had a look, and my blog is the number one hit on google for the search phrase “iphone nibless.” That leads to a blog post I wrote on the subject last year. I linked to another blog that...
View ArticleUIButton graphics highlighting
I have often tried to create a UIButton subclass to do something special, like draw a shadow, but couldn’t make it work. You can’t just override UIView’s drawRect: method and get the results you...
View ArticleInstalling Xcode 3 and 4 side by side on Lion
Xcode 4 sucks so, so, bad. It kills my productivity like whoa. As a consequence, I’ve been doing most of my work in Xcode 3 on Snow Leopard, venturing into Xcode 4 only for testing and final releases....
View ArticleUIImage rotation, part 3
UIImage rotate test program My two earlier entries on UIImage rotation are by far the most popular blog posts I’ve ever written. I’m trying to get back into the blogging habit, so here I am, exercising...
View Article