Latest Articles

Use the navigation at the bottom to see older articles

How to change the background colour of a UIView

You can use the backgroundColor property for this: self.yourView.backgroundColor = [UIColor purpleColor]; Pre-defined values are blackColor darkGrayColor lightGrayColor whiteColor grayColor redColor greenColor blueColor cyanColor yellowColor magentaColor orangeColor purpleColor brownColor clearColor You can also define your own colours by creating a UIColor object (from RGB or HSL values). Here’s how you can create your own RGB […]

Workaround: Parallels Desktop is not seeing my DVD Drive in Mountain Lion

Today I wanted to install Windows 7 using Parallels Desktop 7 on my Mac, but sadly I always got an error message every time I tried. It was saying it could not connect to my DVD drive – which clearly my Mac could.

Doing some research it turns out that several people had this problem, however I didn’t understand the instructions given by Parallels very well. Getting frustrated I decided to write my own, and give you some pointers where else to look for help.

For this scenario I’m using a DVD copy of Windows 7 Home Premium and the latest version of Parallels Desktop 7.0.15107. Parallels Desktop 8 is already out but I’ve decided not to upgrade at this point.

Read more

How to create an NSString from an NSDate

NSDate *date = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateStyle:NSDateFormatterLongStyle]; [dateFormatter setTimeStyle:NSDateFormatterLongStyle]; NSString *dateString = [dateFormatter stringFromDate:date]; First we’ll create a date object. Next we’ll create an NSDateFormatter and set how we’d like for display our date (and optionally our time). Then we’ll call the magical stringFromDate method which will create our string.

Where is the recurring payments dashboard in PayPal

I keep forgetting where to find what used to be known as the Recurring Payments Dashboard in PayPal. They’ve removed this when they restructured their menus a while back, and since then I’m lost when I need to find and change a subscription payment that’s coming in. This option is now hidden in something rather … Read more

How to retrieve the current User Locale

The following method will return a two letter code of which language is set on the iOS device in question: NSString *myLanguage = [[NSLocale preferredLanguages] objectAtIndex:0]; There’s a list of language codes on Wikipedia: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes Note that to compare the current value against a list of languages you support we need use the isEqualToString method. Here’s […]