Archive for September, 2011



So, if you’ve actually done — or tried to do — an iBooks-style page curl yourself for iOS 4, and you’re not an OpenGL whiz kid, you’ve probably figured that’s pretty tough stuff, yes? And the various open source options we’ve mentioned before … well, they’re not really comparable to the real thing are they.

But there’s a new one out that is most definitely worth a look:


A decent page curl transition for iOS.

Yes, the very soul of brevity in description indeed. But accurate!


Very nice looking yes? And multitalented, too:

Basically, XBPageCurl can be used in two different ways. It can be used to curl a view and show another view behind it where the user can interact with its elements and then uncurl the view back, pretty much like in the Google Maps app. It can also be used to flip pages like in iBooks, where the user can drag the border of a page and release to flip it or cancel the flip…

… It controls the cylinder of a XBCurlView instance so that the corner of the page will follow the user’s finger. It has a corresponding protocol that tells its delegate whether the user flipped to the next page, cancelled flipping to the next page, flipped to the previous page or cancelled flipping to the previous page.

Looks pretty sweet indeed. Uses OpenGL ES 2, so that leaves off first and second gen devices, but hey, it’s pretty much time for that anyways.

h/t: Cocoa Controls, ManiacDev!



So you been using that AQGridView we’ve mentioned before for your grid display needs — we have a couple times and found it to work nicely — but looking for another option?

Well, you might try KKGridView:

… Luckily, all of my fellow collaborators shared the common opinion that all of the grid views available now are slow, feature-incomplete, and coded in an inextensible fashion. With this in mind, we set out to create the best grid view component available for iOS to-date…

Well, they certainly don’t lack for hubris, do they now?

Although if the claimed “55+ FPS in the worst case” performance metric is accurate, perhaps that’s actually warranted. We’ll try it on a nice big iPad screen with little tiny thumbnails and get back to you on that!

h/t: ManiacDev!


Drawing Calendars

And as a followon to yesterday’s piece about drawing graphs, today let’s take a look at calendar drawing options. That’s another feature of the well regarded around here Tapku library, and there’s a very nice tutorial here on working with it:

Tapku Library: Displaying Calendar Markers on iPhone

If that doesn’t quite match your needs, you might also want to check out

Kal – a calendar component for the iPhone

This project aims to provide an open-source implementation of the month view in Apple’s mobile calendar app (MobileCal). When the user taps a day on the calendar, any associated data for that day will be displayed in a table view directly below the calendar…

h/t: ManiacDev!


Here’s another one to check out: Custom calendar view for iPhone


Drawing Graphs

So, you looking to add some graph functionality to your app? The go-to library for that has generally been the Core Plot framework we first mentioned a couple years back; but as you may have found trying to use it, it’s … not the most trivial to work with, as you can see from Stack Overflow discussions on it.

There’s another one that’s been around for a while but is suddenly getting some tweet love lately for some reason, though:

s7graphview: UIView to draw sweet graphs


General consensus appears to be that it’s a good bit simpler but on the limited side, and still not exactly what you’d call simple.

Personally, we’ve had good experiences with code from the Tapku library, so although we haven’t compared its capabilities to the above options in detail, we’d rather incline to check it out first had we something requiring a little customization in mind, especially as it looks quite pretty indeed:

Screenshot 2011.09.15 20.10.03.png

Or, you know, there’s always the option forthrightly expressed in this Stack Overflow question:

You can

A) Waste your time with Core Plot, which as mediocre as it is for a framework, is the best option for a native solution.

B) Use one of the 19 billion excellent Javascript and/or HTML 5 charting frameworks out there and import them with a web view, then go to dinner.

Frankly, I always go with B when possible.

That we suppose could work out as quite the timesaver development-wise, yes. Any of you subscribe to that philosophy as well and have any particular recommendations out of that 19 billion as working nicely in UIWebView, Dear Readers?


Well, here’s one to start with: graphael-objc for iOS is a wrapper for the gRaphaël JavaScript Library, which looks like as good a place as any to start experimenting with this use Javascript idea…


Wolf3D+DOOM 2.1 Source Code

Source code is out for the latest versions of

What’s new in the update? Here’s the rundown…
Universal apps with iPad and Retina Display support
Revised user interface with a re-mastered HUD and all new menu art
Re-mastered sound from the original MIDI source files
Original cover art splash images
Locked 60 fps for Wolfenstein 3D Classic Platinum/Lite (improved framerate on all devices)
In App Purchase in Wolfenstein 3D Classic Lite to purchase the full game (Platinum Pack)
Wolfenstein 3D Classic Platinum/Lite now under the Apple 20MB download cap for 3G
Optimized for the iPad 2 (re-compiled under iOS 4.x with XCode 4.x)
Assorted bugfixes
Removed multiplayer support (currently broken due to iOS 3 and iOS 4 releases). MP will be re-released at a later date in a more robust fashion.

and you just know you’re going to find all sorts of helpful tips in there, don’t you now?

Wolfenstein 3D Platinum Source Code 2.1

DOOM Classic Source Code 2.1


Elegant Delegation

Here’s a worthwhile read on the merits of analyzing your delegate’s implementations at the point of setting instead of at every call:

Fast and elegant delegation in Objective-C

If you call an optional delegate protocol, and it grows larger and larger, you find yourself write variations of this ugly block all over your code:

if ([self.delegate respondsToSelector:@selector(pdfViewController:didDisplayDocument:)]) {

[self.delegate pdfViewController:self didDisplayDocument:self.document];


I consider this code smell, and it doesn’t get easier once you decide to change the delegate. While developing PSPDFKit (a commercial, extremely fast iOS pdf framework), i found myself in the situation of polluting my code with those delegate calls all over the place. There has to be a better way…

… A pattern that’s common in Apple classes is to pre-analyze the delegate, and remember which methods are implemented and which aren’t. I did some profiling and discovered that this is about twice as fast…

Yep, clear benefits in maintainability and speed both, that does indeed look like a pattern worthy of adoption wethinks.

h/t: @steipete via @mariozullo!



So, Mac programmers, you stumbled across XPC yet? If not, here’s why you should:

XPC is a set of new APIs on 10.7 which “provides a low-level (libSystem) interprocess communication mechanism based on serialized property lists”. If you plan on doing networking in your Mac apps and still hope to distribute in on the App Store, you better learn this stuff pretty quickly. With the required sandboxing that’s coming soon for the Mac App Store, XPC is going to be necessary for your app to do anything “dangerous”…

And to help us out with that:

XPCKit is a Cocoa library for wrapping the XPC C APIs in a handy object-oriented model. It is merely meant as an object-oriented wrapper for the C library, and does not attempt to layer any additional semantics on top.”

Still a work in progress, but definitely worth keeping an eye on!