What is a typedef enum in Objective-C?

I don’t think I fundamentally understand what an enum is, and when to use it. For example: typedef enum { kCircle, kRectangle, kOblateSpheroid } ShapeType; What is really being declared here? 13 s 13 Three things are being declared here: an anonymous enumerated type is declared, ShapeType is being declared a typedef for that anonymous … Read more

Shortcuts in Objective-C to concatenate NSStrings

Are there any shortcuts to (stringByAppendingString:) string concatenation in Objective-C, or shortcuts for working with NSString in general? For example, I’d like to make: NSString *myString = @”This”; NSString *test = [myString stringByAppendingString:@” is just a test”]; something more like: string myString = “This”; string test = myString + ” is just a test”; 30 … Read more

How can I disable ARC for a single file in a project?

I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a little more fragile right now. I recall hearing that there was a way to disable ARC on a per-file basis, though I have been unable to … Read more