Code Created When Using ctrl + Drag to Connect UI Elements in Xcode 4

I was curious what code is generated in Xcode 4 when you ctrl + drag from a UI element to the header of the xib’s view controller.

For outlets, Xcode will create the @property in the header file and add a @synthesize to the implementation file. It will also add an entry to the viewDidUnload method to set the value of the outlet to nil. If your implementation file does not have a viewDidUnload method one will be created. Here is the code made for a label outlet:

-ViewController.h-

@property (weak, nonatomic) IBOutlet UILabel *label;

-ViewController.m-

@synthesize label;

in the viewDidUnload method

[self setLabel:nil];
For actions, Xcode creates an entry in the header and an empty method in the implementation file. Here is the code generated for an action:

-ViewController.h-

– (IBAction)buttonPressed:(id)sender;

-ViewController.m-

– (IBAction)buttonPressed:(id)sender {

}

Keyboard Shortcuts For Moving Around in Xcode

Using Xcode on a 13″ monitor gets pretty cramped so I need to be able to hide parts of Xcode I don’t need when I’m done using them. Here are the keyboard shortcuts to show/hide the 3 view areas in Xcode:

Navigation –  Command key icon0

Debug –   Shift iconCommand key iconY

Utilities –  Option or Alt key iconCommand key icon

StackTrace: A Stylish StackOverflow Viewer For iPad

Gave StackTrace for iPad a try after I seen @cocoasamurai mention it and have been very happy so far. For a while I would use RSS to follow a few topics on StackOverflow but got tired of Reeder on my phone having an unread badge in the 1000-2000 range.

StackTrace looks good and makes it easy to add tags, search for questions, and favorite a question to view it later. The app is read-only but there is an option to open a question in Safari wehere you could ask/answer a question. Here is the iTunes link for StackTrace if you want to give it a try.

 

WWDC 2013 Notification

If I have any hope of making it to WWDC 2013 I have to start preparing now. Step #1 for me was to signup for the handy WWDC notification service offered by wonderful folks at wwdcalerts.com. Now when the 2013 tickets go on sale I get an SMS message, very cool. 

Calling My Shot

Found a neat article today titled 366 or How I Tricked Myself Into Being Awesome and it has motivated me to stop being a lazy wuss and to “call my shot” by stating my goals publicly on the internet.

Question:
Since nobody reads this blog, won’t listing my goals here be about the same as a tree falling in the woods with nobody around to hear it?

No, that would assume I care more about what people think of me than what I think of me. Nobody can make me awesome but myself, time to get going.

Goals:
#1 Post new blog entry, everyday.
#2 Program, everyday.
#3 Attend WWDC in 2013.