Monthly Archives: August 2011

CALayer Internals: Contents

It’s right there in the CALayer documentation: contents An object that provides the contents of the layer. Animatable. @property(retain) id contents Discussion A layer can set this property to a CGImageRef to display the image as its contents. The default value is nil. There’s … Continue reading

Posted in Explanation | Tagged , , , | 1 Comment

CALayer’s Parallel Universe

Ever tried to animate a UIView’s position?  It’s easy, using UIView animation class methods like animateWithDuration:animations: and friends.  Simply change the position inside the “animations” block, et voila, a pretty animation with the duration of your choice. But have you … Continue reading

Posted in Explanation | Tagged , , , | 1 Comment

Integers in Your Collections (NSNumber’s not my friend)

Early on in the days of learning Cocoa, I remember coming across a situation where I had a bunch of integers that I needed to keep around, but wasn’t immediately sure about how to go about doing that using an … Continue reading

Posted in Code | Tagged , , , , , , | Leave a comment

Things I Learned at Siggraph

Our legions of dedicated fans (hi Mom) may have noticed a dry spell in the posts of late.  This is partly because I spent last week in beautiful Vancouver, B.C., attending the annual Siggraph conference.  In between time spent watching … Continue reading

Posted in Philosophy | Tagged , , , , , | 1 Comment

Tweet

Posted on by Joel Kin | Leave a comment

Quick Tip: Drawing Right Side Up With Core Text

Anyone who has decided to explore using Core Text on iOS has probably noticed that everything is drawn upside down. This is because Core Graphics contexts that have been created with functions provided by UIKit (such as UIGraphicsBeginImageContext, or the … Continue reading

Posted in Code | Tagged , , | 3 Comments

Localizing Arbitrary Strings the Scripty Way

I bet you saw my post about localizing US states and said to yourself, “Ha! That little sed script won’t do much for arbitrary strings!” You’re a jerk, but yes, you’re right. Before I give it away, does anyone see … Continue reading

Posted in Code | Tagged , , | Leave a comment

Mistakes Were Made: Initialize Your Locals

“Mistakes Were Made” may or may not end up being a post series where we talk about actual things we have done wrong, and the lessons thereby learned.  The uncertainty is about whether revealing all this stuff will make us … Continue reading

Posted in Code | Tagged , , | Leave a comment