Latest Articles

Use the navigation at the bottom to see older articles

How to determine screen size in iOS

The UIDevice class can help us do that like so: [super viewDidLoad]; // lets detect the height of our screen here int height = [UIScreen mainScreen].bounds.size.height; int width = [UIScreen mainScreen].bounds.size.width; // share the news NSString *message = [[NSString alloc]initWithFormat:@”This screen is \n\n%i pixels high and\n%i pixels wide”, height, width]; NSLog(@”%@”, message); This will work […]

How to map IMAP folders in Mac Mail

I have been driven nuts on several occasions by the likes of Yahoo: change your password, and you have to tell every single device, sometimes several times. If everything fails, delete the email account completely and add it again afresh.

This presents a problem: your SENT or DRAFT items may no longer be where they after adding your email account again. There is of course a way to map those IMAP folder, but if you’re like me you hardly ever use this option and forget when it’s time to do it again.

So here’s how to do it – perhaps it helps before checking yourself into the local nut house.

Read more

How to reverse a BOOL in Objective C

Sometimes you need the opposite of a BOOL. This is actually easier than I had expected – because the opposite of YES is !YES and the opposite of NO is !NO. More examples here: http://stackoverflow.com/questions/6829573/reversing-a-bool