WatchKit Double Tap

Sadly there's no double tap gesture in the current WatchKit version. It is possible though to manually detect double taps.
This isn't possible with a button because the system doesn't send all tap events if one is too fast. But with a table we get all the taps unfiltered and can now messure the time between taps and detect double taps.

Just create a table with one row and put whatever you want tappable inside that row.

@implementation InterfaceController {
    NSDate* _lastTouch;

Self Storing Model

I wanted a simple way to persist my model changes without having any boilerplate code in the model classes. With this solution any model object just has to inherit from Model, that's it.

Android Remote Gallery

Simple Activity to display some images from a server. The images are first downloaded and then presented inside a ViewPager. Works for all Android versions.

Android WebView Content

Sometimes you want to look at the html that’s currently beeing shown in a webview. Using a JavascriptInterface this is easy and works on every Android version.

When using API 17+ you’ll need the @JavascriptInterface annotation.

Metadata Recognition with AVFoundation

iOS 6 let’s you detect faces on a AVCapture preview. In iOS 7 barcodes and qr-codes have been added and work in the same way.

Device and Interface Orientation with iOS

First, you have to know the difference between UIDeviceOrientation and UIInterfaceOrientation. The device orientation is the orientation the device is currently at. We can get the device orientation with this call:

[[UIDevice currentDevice] orientation]

Selecting a Random Record with PHP and MySQL

Selecting a random record with MySQL can be achieved with one simple select:

How To Redirect Mobile Users

Providing a mobile friendly version of your website is defently a good idea. I summed up a few code snippets in different languages to help you redirect the visitor to your mobile website.


Using the 960 Grid System

I recently created a website using the 960 Grid System. It let’s you create a grid-based layout with ease but also offers enough freedom. In this post I’ll show you how to use 960gs.

XSLT Tutorial

With XSLT (Extensible Stylesheet Language Transformations) you can transform a xml file into any desired output. You can generate html, text or even sourcecode.