How to dequeue UITableViewCells

Sometimes Xcode does a bit of magic behind the scenes which I don’t really understand. Consider this standard table view method to display cells: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@”Cell”]; // populate your cell return cell; } Where do we actually ever create a UITableViewCell? All we’re asking here […]

How to hide (and show) the UISearchBar in a UITableView

If you add a UISearchBar to your table view (see previous article) it’s just sitting there by default. Chances are you’d like to hide it when your table view first loads. You can do this by adding the following code to your viewWillAppear method: – (void)viewWillAppear:(BOOL)animated { // scroll the search bar off-screen CGRect newBounds […]

How to create a searchable UITableView

The ingredients for a search function in a UITableView are more involved than just displaying a simple search field. First we need the standard UITableView. Next we need a UISearchBar which can be added to the top of the table view. But displaying the actual search results is something called the UISearchDisplayController. This process isn’t […]

How to restore WordPress to a different domain

In this podcast I will show you how to restore a WordPress site that we’ve backed up in the previous show. In particular, we will restore a remote website to our local system first, and because it’s a rather tricky process we’ll also install it on another remote host. For both examples the domain will … Read more

How to fix “this class is not key value coding-compliant” after accidentally adding an IBOutlet instead of an IBAction

It has happened to us all: you’re in a storyboard, you’re using the Assistant Editor, you want to control-drag from a button into your code and create an action. But sadly you forget to select “Action” from the drop down menu and instead create an outlet. No biggie you think, deleting the outlet code. You […]

How to convert an NSString into an integer

Imagine you had an NSString and wanted to save it as an integer value. You can use the intValue method for that: NSString *myString = @”47″; int myInt = [myString intValue]; To do the reverse, you can use the initWithFormat method: int myInt = 32; NSString *myOtherString = [[NSString alloc]initWithFormat:@”%i”, myInt];

How to backup WordPress

In this podcast I will show you how to backup a full WordPress installation. This includes your files and your database. It’s not a tough task, but you need to know how to do it. We will be using FileZilla and phpMyAdmin for this. Have your credentials ready (you’ll get those from your hosting provider). … Read more

How to style the Add Media button in P2

I’ve noticed that the Add Media button in P2 version 1.4.2 is a bit too low when you write a Blog Post. The button usually sits neatly above the status box, however it cuts into the top of the box due to the additional text field for the blog post – like so: It’s not … Read more