Latest Articles

Use the navigation at the bottom to see older articles

What is an Exception Breakpoint

Sometimes Xcode just throws an error message that isn’t very helpful. That’s usually when we have to try and figure out why something didn’t go the way we expected it. Other times however, Xcode tells us very clearly which element it isn’t happy with – we fix it and our app progresses. Why can’t it […]

How to increase the number of simultaneous IMAP connections in Plesk

Plesk-LogoBy default Plesk sets up the IMAP Email Service on your server so that four simultaneous connections can be made from the same IP address in the same timeframe. This is to protect your servers from too many connections.

This however isn’t cutting it if you have a small office full of people on the same IP, connecting from 4 computers, 16 iphones and 12 iPads every 5 minutes.

The solution: tweak the IMAP configuration file, restart the daemon and have a good life. Let me show you how to do it on Plesk 11 and CentOS 6.4.

Read more

How to activate a UISearchDisplayController

We can do this two ways: // version 1: [self.searchBar becomeFirstResponder]; // version 2: [self.searchDisplayController setActive:YES animated:YES]; The benefit of version 2 is that if we perform it “in vision”, we can use the animated option and make it look all swish. Version 2 of course also has a reverse with which we can deactivate […]

How to extract first n characters of an NSString

We can use substringWithRange for this, which requires us to define a range: NSString *something = @”123456789″; NSRange myRange = NSMakeRange(2, 3); something = [something substringWithRange:myRange]; // something is now 345 You create a range by specifying where the substring should start (the first character is 0, like in an array), then specify how many […]

How to create your own Data Type using typedef

With typedef you can specify custom variable types. Instead of having a variable such as int, you could create your own – such as yourInt: // create a typedef of int typedef int yourInt; yourInt yourValue = 57; NSLog(@”Your value is %i”, yourValue); Now you have your own variable type called youInt which behaves just […]

How to create an Enumeration (enum)

An Enumeration (enum) allows you to create a collection of custom values. These can be more meaningful than simply using numbers. Imagine you want to track drink sizes, such as small, medium and large. You can remember to just use the numbers 1, 2 and 3 for each size – but Enumeration makes it easier […]