Install Theme

Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.

Madson Mac

Mar 22 '13

How to declare enum in Objective-C

Apple recommends defining enums like this since Xcode 4.4:

typedef enum ShareType : NSUInteger {
    kTwitter,
    kFacebook,
    kGooglePlus
}

They also provide a handy macro NS_ENUM:

typedef NS_ENUM(NSUInteger, ShareType) {
    kTwitter,
    kFacebook,
    kGooglePlus
};

These definitions provide stronger type checking and better code completion.

Mar 18 '13

Dec 12 '12

Oct 29 '12

Introduction to Node.js with Ryan Dahl

Oct 13 '12