Freelance iOS Developer, Rapidly Aging Punk

Tap Anywhere to Dismiss the iOS Keyboard

Nov 13, 2014 at 12:39PM

This is something so common I feel like it should be a built-in feature. It isn't though, so here's how to implement it yourself. If your app uses a UINavigationController a custom subclass of that is a good place to use this.


@interface RootNavigationController ()
{
    UIGestureRecognizer *tapRecognizer;
}

@end

@implementation RootNavigationController

- (void)viewDidLoad
{
    [super viewDidLoad];

    tapRecognizer = [[UITapGestureRecognizer alloc]
        initWithTarget:self
                action:@selector(dismissInputViews)];

    [tapRecognizer setCancelsTouchesInView:FALSE];
    [self.view addGestureRecognizer:tapRecognizer];
}

-(void)dismissInputViews
{
    [self.view endEditing:YES];
}

@end

That's it.


Latin For Not Really

Nov 08, 2014 at 12:20AM

I'll admit that I watched this episode of South Park - essentially a 22-minute long indictment of The Simpsons Tapped Out - while playing The Simpsons Tapped Out on my iPad. The irony was not lost on me.

I'm happy to say that I didn't throw too much money down this particular well: My tallied up iTunes receipts equal just about four bucks. But it's absolutely true that above all I've been burning a lot of time on this game that isn't really fun and isn't really a game. Time I could be using at the very least playing better games.

I've learned my lesson. App deleted.


I Went to Hawaii

Nov 07, 2014 at 04:42PM

And if you click on the picture below, you can see a small gallery of photos I took there.

A tree on a beach


Sky Harbor

Oct 23, 2014 at 08:09AM


Transit - Joyride

Oct 21, 2014 at 02:48PM

Transit's really great new album Joyride is out today. You can listen to the whole shebang on YouTube but here's their video for Rest To Get Better.