Mar
26
2009
In the previous post I described the basics for working with code completion in Xcode. In this post I will show how you can use built-in text macros to insert various code fragments.
As an example, begin by entering ifelse into Xcode and follow this by pressing Control . (control period) and you’ll see the following code block inserted:
Continue reading...
Mar
05
2009
What follows is a quick review of how I use code completion in Xcode. Chances are that options and features exist beyond what I’ll cover here, so comments and suggestions are welcome.
Let’s say I want to insert a CGRectMake method. I can begin by typing CG and pressing F5 (or Option-esc), which will popup a list of possible matches:
Continue reading...
Mar
01
2009
A little off topic, but a good tip none the less…
Apple recently released Safari 4 beta and if you haven’t given it a try, I highly recommend you do.
Continue reading...
Mar
01
2009
Okay, so figuring out how to unwind an Objective-C object into its base representation goes against all that is object-oriented programming, however, it’s interesting none-the-less.
In Objective-C there is a directive, @defs(), that outputs (at compile time) the list of instance variables for a class. We can use this list to create a C structure with the variables of a specified class.
Continue reading...