Archive for March, 2009

Mar 26 2009

Xcode Code Completion Macros

Published by under Xcode

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...

One response so far

Mar 05 2009

Xcode Code Completion

Published by under Xcode

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...

11 responses so far

Mar 01 2009

Safari 4 Beta

Published by under General

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...

Comments Off

Mar 01 2009

Objective-C Object as a C Structure

Published by under Objective-C

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...

4 responses so far