How to test the state of a UISwitch

We can use the isOn property of your switch to do this: if (flickSwitch isOn) { statusLabel.text = @”The Switch is ON”; } else { statusLabel.text = @”The Switch is OFF”; } Alternatively we can use the square-bracket notation like so: if ([flickSwitch.isOn]) { statusLabel.text = @”The Switch is ON”; } else { statusLabel.text = […]

Welcome to my iOS Dev Diary

I wanted to write apps for iOS ever since I bought my first iPad. In fact I’ve quickly invested into a MacBook Pro in June 2011 just so that I could do it. That is now exactly one year ago. I’ve managed to put my “Hello World” app together and expanded several other options to […]

How to change your MySQL User Password

Today I had to admit that I did not remember the password for a MySQL user account. Since it’s saved in encrypted form simply reading it out won’t mean I can recover it. A Google search did eventually bring up the correct way of doing it, however it took me quite some time – so here’s how you can do this:

Read more

How to bring back Post Categories in P2

We’re all excited about the new features in Automattic’s P2 Theme v1.4.0 – however many of us have setup custom tweaks around Post Categories. In the latest version these have been replaced with Post Formats.

Post Formats are great, but they are limited to values defined in the WordPress core. If you wanted to create a new post menu like “critical” or “alarm” this wouldn’t work. We could use Custom Post Types to add to those formats, however it’s way too big an operation for I wanted to achieve: which is bringing back the “posting into categories” feature we’ve come to love from the previous version.

In this article I’ll show you how to back-port categories so posts will appear as they did in P2 v1.3.3 while retaining all functions of the latest update.

Read more

P2 Theme gets an upgrade: say hello to Custom Menus and To-Do List Support

Today P2 Version 1.4.0 has been released – hurra! Thanks for everyone’s hard work on this amazing theme.

P2 now boasts a couple of extra options and plenty of changes under the hood, but like many other great features those are not immediately obvious. Let me show you how the new changes work and how they can make your P2 experience even better.

Read more