April 2010

You are currently browsing the monthly archive for April 2010.

Today, I wanted to display a time-value of 9 minutes and 3 seconds like this: 09:03

Thus, I typed this snippet into my Objective-C code:

labelTimer.text = [NSString stringWithFormat:@"%2d:%2d", minutes, seconds ];
[/code]

This did not yield the result I wanted. The numbers were padded with spaces, not zeros. Sadly, Apple left out the options for the different format specifiers like f, d, @ … completely. You have to rely on old C skills… Continue reading

If you have ever written code in Java or .NET, you will truly learn to appreciate the garbage collection, i.e. objects that are no longer referenced are being freed from memory. Automatically no less.

A lot of people do not like it for reasons of their own and I do not want to get into those.

What I do want to discuss is that in an environment in which you are responsible… Continue reading