How to fix “ibtool failed with exit code 255″
I got this error message recently on a project that worked fine when I tried last (WordPress for iOS). The error didn’t make any sense, and no matter what I tried the app wouldn’t compile anymore, always stopping with the following error message: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255 I can imagine Xcode gets confused at times, as I currently have Xcode 4.6.3 and Xcode 5.0 installed, and I use them both (though not at the same time). A quick...
read moreHow to centre an image in CSS
Centering text in CSS is relatively easy. All you do is add the “text-aling: center” property. If you’ve ever tried this with anything that isn’t text you’ll have noticed that this approach doesn’t work. Instead, display your class as a block, then set the margins to auto. You also need to specify a width so the rest flows around this fixed parameter: .yourclass { margin-left:auto; margin-right:auto; width: 400px; display:block; } This approach works with everything that is not text such as images. Thanks...
read moreIntroducing Zen Dash
It is my pleasure to share with you my latest WordPress Plugin: Zen Dash. It allows you to selectively hide those Dashboard Widgets, Menu Items, Update Notifications and even Footer Links. Inspired by Joseph Lowery and my recent post about how to do this in code, I wanted to create the same functionality without users having to use code. After a few days of coding I really got into it and added several other features, including some nice jQuery UI tabs. Under the hood is the same code I’ve described in my aforementioned article, coupled...
read moreDisk Space Pie Chart – Version 0.5 released
I’ve just released a small update for my Disk Space Pie Chart plugin for WordPress. The new version addresses the following minor issues: Fixed Division by Zero bug (Thanks, Jure!) Tweaked some colours to better blend with WordPress Core Added MySQL Server Version The update was inspired by Jure di Mephit who very kindly gave me a tip on how to fix a bug in July last year… I didn’t find the time to write that update until now. Hey, better late than never. Thanks again, Jure Find more info about the plugin here, or download...
read moreHow to animate a UIView
In this example we have two UIViews: one backgroundView which does not change, and one numberView which can be moved, for example by a pan gesture (we’re not dealing with that though) Once the user lets go of the movable numberView, we want to reset the view back to the middle, to the same position as the backgroundView. Here’s how we do that: // setup animation parameters [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; [UIView setAnimationDelay:0.1]; [UIView...
read moreHow to add touch events to a UITableViewFooter (or header)
Table View headers or footers can’t be tapped. Sometimes however that’s exactly what we want to do. In this example we’ll add a new UIView to out table view and add it to the table’s footer. Inside this view we’ll have a custom button which we’ll create with an image. We’ll also have a method that is called when the user presses the button: – (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { // height of the footer // this needs to be set, otherwise the...
read moreHow to tag a release in Git
Like in Subversion, Git supports tags. Most developers use tags to “freeze” a bunch of files at a moment in time, much like a snapshot. Commonly this feature is used whenever a new release of your software is… well… released. Xcode does not support this feature via the GUI, but of course Git does. Let’s see how to do this from the command line. Tagging the current branch You can create a tag from whatever you’ve just committed, no matter which branch this is on. Simply head over to your project and type the...
read moreHow to find your Akismet API Key
It’s happened to me more often than I can remember: you build a new site, you want to put it live, and you want to switch on Akismet. You know you have an API key – but where on earth is it? If you’re running Kismet If you have the Akismet Plugin installed, head over to Plugins – Akismet Configuration. Among other things you’ll find your API Key there. If you’re running Jetpack If you have the Jetpack plugin installed then you need to look under Jetpack – Akismet. If you don’t have an existing...
read moreHow to deploy apps to an iOS 7 device and retain iOS 6 “Legacy Look”
When you deploy an app with Xcode 5 to an iOS 7 device, all UI elements have the new iOS 7 look. This is true even if the app was never made for such snazzy graphics. Sadly, on some occasions, that new look blows up in your face, rendering your “legacy” app useless in iOS 7. However, when the same app is deployed with Xcode 4.6.3, all UI elements look like they did in iOS 6. So the question is, can we deploy our apps and make sure we get “The Legacy Look” on iOS 7 devices? The answer is yes! All we have to do is use...
read moreHow to add iOS 7 Icons in Xcode 4.6.3
Even though Xcode 5 GM Seed is already out, I’d still like to use Xcode 4.6.3 to submit updates of my “legacy” apps. Xcode 5 ruins certain aspects of my design, plus I’d like to keep the iOS 6 look for now. Xcode 5 uses Asset Catalogues to keep track of images, and there’s seemingly no way to convince Xcode 4.6.3 to take icon sizes other than iOS 6. The good news is that we can add such icons in Xcode 4 with a trick: create new icons copy them to your project add them to your Info.plist file Here’s how...
read more