Constants

    String Constants In your .h file extern NSString *const MyKey; Your declaration NSString * const MyKey = @"12345";    

Read More

.ARC General

  Before ARC was introduced you had to manually retain/release/autorelease objects to ensure they would exist for as long as you needed them. Forgetting to send retain to an object, or releasing it too many times would cause your app to leak memory or crash. A good overview of ARC: longweekendmobile.com   Turning on ARC for an […]

Read More

Memory General

Variable & Object Types BOOL Values:- YES, NO NSLog(@"The answer is %i", MyValue); char UInt8 int 32bits (currently unless the iPhone ever moves to a 64bit chipset).  If you want to future protect pointers for a 64bit system you can use NSInteger instead. NSLog(@"Value = %i", MyValue); Converting an int to an object: [MyArray addObject:[NSNumber […]

Read More