[Valid RSS]

Good environment variable values during iPhone development

Share

Directly from GHUnit, a small note about which environment variables to set while developing for the iPhone.

Environment Variable: Default: Set to:
NSDebugEnabled [...]

Get rid of folder that should not be versioned

Share

If you work with subversion, for sure you had the problem to tell to subversion to ignore a folder inside your working copy. This happens for example if your IDE builds the sources in a folder inside your working copy. From the very first commit you’ll start noticing that subversion wants to add that “build” [...]

Chosing the number of decimal digits when printing a number with iPhone

Share

This is a small snippet, useful whenever you want to convert a floating point number in a string with a fixed number of decimal digits.

NSNumberFormatter *format = [NSNumberFormatter new];
[format setMaximumFractionDigits:1];
NSNumber *aNumber = [[NSNumber alloc ] initWithDouble:54.4235264];
NSString label = [[NSString alloc] initWithFormat:@”The number is %@”, [format stringForObjectValue:aNumber]];
[distance release];
[format release];

Obviously the NSNumberFormatter [...]

iPhone: how to select a UITabBarItem programmatically

Share

I’m working to an iPhone application with a TabBar on the footer area. Among the others there are a “Home” button and an “Account” button. The first allows the user to see a view that gives an overview of the application. The latter shows the view that the user uses to manage his/her account.

If the [...]

Readonly computed properties in Objective-C

How to implement a read-only computed property in [...]