UISplitViewController+QuickAccess

OK, let's switch gears and not talk about cats for a while shall we? Although fair warning, this post will only be interesting to somebody who does iOS programming. Hey sometimes that happens. Last week I sold my car so California could get it dismantled. If you don't want programming articles ask me about that sometime, and maybe I'll write a post about that.


OK, if you're still around you have some interest in code. Let's dive in. I have a few bits of code that are shared between the two iOS projects I'm working on currently. One is a dirt simple category that lets you quickly access controllers in an iPad UISplitViewController. In theory accessing the left controller is a single line of code, but it's a complicated line:

- (UIViewController*)leftController {
    return [[self.viewControllers objectAtIndex:0] topViewController];
}

And this is really the way I think of split views: there's a left controller and a right controller. I understand why that is represented as an array of UINavigationControllers but the whole point is that UISplitViewController should be an abstraction. When I think "OK, we need to notify the left ViewController that I just opened the map view so it can update the UI elements" I just want the left controller. I don't want to start thinking about stacks of controllers contained in an array and figure out the proper string of messages to get the left controller.

And I do that all over the place. I kept copying that damn string of messages around and every time the "Keep it DRY" birdie would hoot shamefully in my ear. So I finally got fed up enough to make a category to make UISplitViewControlller do what I want. Of course, this wasn't that DRY because I had two projects and they each had these source files but it was better.

Today I finally got around to sorting out how to put the category in GitHub as its own project, make a local repository, and then pull those files into both projects. This is actually the small code trial run for doing the same thing with some code that works around an iOS bug involving NSMutableCharacterSet. More on that later!

Anyway, if this category sounds useful to you I cleaned up the source, figured a modern Creative Commons license for it and put it on GitHub. Enjoy and let me know if you have any issues!

Farewell Schrödinger

(sigh) There were days where I worried about posting too many cat pics, or too many cat stories and turning this blog into a "cat blog". Well here we are in 2014 and there is probably some question about why I have a blog at all, as much as I use it. There was only one post in 2013 and it was my post about Heisenberg dying. Now I have to write about Schrödinger dying and it's not just a cat blog it's a cat death blog, which is a hideous idea. But still, I feel I should write something about my best little girl.


Two weeks ago I noticed she was having some trouble peeing and that she generally seems a little listless. I needed to schedule a checkup for her in January anyway so I went and scheduled her an appointment for the following Monday. She seemed better but not 100% on Saturday and Sunday and so I took her thinking she probably had some sort of low-grade illness. The doctor said she was constipated and so they gave her an enema. I had to leave her for most of the day but I picked up her up in the afternoon. She seemed upset, but understandably so and we spent a fairly stressful evening and night with her sleeping alternated with complaints and more … let's just say evacuation.

Tuesday rolled around and she was very listless and I couldn't get her to eat anything. I talked to her doctor, and we confirmed that she had a bladder or urinary infection. Her doctor said the listlessness could be discomfort from the enema as well as pain from the infection so we started her on antibiotics and a painkiller. Wednesday she still wouldn't eat and I was planning on bringing her in to see the doctor in the afternoon but before that she had a seizure. After the seizure she was almost completely paralyzed so I rushed in for the doctor to see. She was dehydrated and her body temperature was low so they kept her overnight on an IV. Thursday she was still cold and they warmed her up but she never really regained consciousness. Best guess now is that she suffered brain damage during the seizure and by Thursday afternoon it was clear she wasn't coming back and we had her put to sleep.

When Heisenberg died I was worried that Schrödinger was going to take it poorly and I thought she'd be very negative about any new kittens. I have to admit she stepped up to the plate and was more than willing to snuggle with Karin like Heisenberg had all his life and she generally did a bang-up job of being the only kitty in the household. We'll have cats again around here again, I'm not sure when but for now we'll get used to being a family of two. We need a bit of a break before having cats around won't be a painful reminder of the two we've lost.

Seventeen years ago I saw this tiny little runt of a fuzzball bossing around all the other kittens and I fell in love immediately. Since then I was privileged to be bossed around the the mouthiest little cat I've ever known and to learn her increasingly intricate little rituals. I learned how to make a fort out of pillows, an armchair and a blanket that she could sleep in when she was cold. I learned when she needed a snuggle, when she needed to be chased up into one of her "safe bases", and when she just needed to sit on the back of an armchair while I read a book. Well, I've made her last fort, I've given out her last piece of crinkly crepe paper to tear up, I've taken my last instruction from my bossy girl, and I've snuggled my last snuggle with my mouthy, smart little sidekick and companion. She's followed her brother off on their last adventure.

Farewell Schrödinger.

Goodbye Heisenberg

One of my favorite things I've written here involved Heisenberg reminding me to stay in the moment. Back in 2010 I teared up a little while writing "remind myself that he won't be here ten years from now" and I'm crying now as I write this because Monday afternoon we had to put him to sleep. It's been a long time since he's been truly healthy and we had a real scare with him back in January but he bounced back and seemed to be doing OK for a while and was happy and affectionate. This past weekend he just sort of started … shutting down. I was denying it through Sunday night but by Monday morning he couldn't even stand up and I had to admit that things were bad. I took him to the Cat Hospital but they couldn't do anything for him.

He had a good life, he was almost seventeen years old, and Karin and I both got to hold him and say goodbye as he left. It was about the best ending I could have imagined for him but he's still my little guy and I miss him terribly.

I had to change my desktop wallpaper because this picture still chokes me up to look at. For now. But it's one of my favorite pictures of the little doofus and someday I'll be able to treasure it without the tears. For now I'll just leave it here as a bit of tribute where I can share it but not see it constantly.

Goodbye Heisenberg. We love you and we will always miss you.

Heisenberg with a Windowsill

Heisenberg with a Windowsill

Road Trip 1.1 is Available

Did you get a shiny new iPhone 5? Well, an elongated version of Road Trip awaits you in the App Store! Support your favorite independent iOS developer by picking up a copy. If you've purchased it already then thank you and be sure to get the update.

If you do buy (or bought previously! Even if you rated 1.0 you can rate each version separately. Annoying but true.) a copy please take a moment to at least rate the app. I know, I know, I hate app developers begging for ratings as much (and probably more) than most people but it really does make a huge difference to sales. It amounts to the only marketing that can be done inside the App Store proper and Apple uses that data to drive how visible it is in search results and category lists. Version 1.0 never got enough ratings to display an aggregate and now that 1.1 is in the wild the review count is reset back to zero. I won't put a begging dialog in the app but I'm not above asking for ratings on the blog …

(If you're new around these parts you can read my story about developing Road Trip.)

App Store Link

Another year, another Registrar

I'm switching domain registrars again. In all honesty the fact that you can read this probably means it works, but I guess maybe part of it could work but not other parts. At any rate, if you see anything odd drop me a line. There's a contact box at the right, down at the bottom of the sidebar.

For the curious/technically inclined I switched to Hover. I was reasonably happy with EasyDNS but there were a few things that bugged me, in order from most to least aggravating:

  1. No privacy options. I don't think I've ever been contacted via my WHOIS info but there's no real reason to have that hanging around out there. EasyDNS has help pages that seem to say this isn't possible but that's just patently false. Yes, a contact must be listed. But it doesn't need to be me and there are plenty of registrars in the sea that will do this. It's free at Hover and in fact is defaulted to on.

  2. Couldn't set the @ A record for hiddenjester.com. I pretty much want everything for hiddenjester to dump into Squarespace except for mail, which goes to Fastmail.fm. Without the @ A record if you did a dig on hiddenjester.com you got back nothing. Hover will let me send that to Squarespace. This is one of those "does anybody really care" things, and the A record for hiddenjester.com covers 99% of the cases but still … it was weird that the option was not available.

  3. EasyDNS got a little spammy about renewals. I received seven total emails from them about renewing, going all the way back to late July. That wasn't really a huge deal but it was slightly annoying. And it's poorly timed right? They start annoying me right when I can jump ship and go somewhere else?

  4. The EasyDNS dashboard/configuration/whatever-you-want-to-call-it page is confusing to me. Some things are off my account, some things are managed in the domain, then when you get into the domain there are several little subpages, etc. It worked but in comparison when I log into Hover I get a screen listing my domains, click one, and there's a "Domain Details" name for setting the name servers and the WHOIS stuff, then there's a DNS tab that has all of the DNS records listed for easy tweaking. (There are other tabs, but ones I can safely ignore. The Easy DNS separation between "account" and "domain" was less clean to me.)

The thing is at the end of the day I don't need complicated DNS stuff, and I don't need fancy options. I don't want a lot of handholding, I just want to drop in, set the things that need to be set and then not worry about it until I need to renew. At that point I'd like one email about it, maybe a month or so out. If I don't mess with it, ideally it would just roll over and charge me another year. I liked EasyDNS overall, and they certainly were head and shoulders above a Network Solutions or a (shudder) GoDaddy, but it seemed like there were both more knobs than I wanted, and a few knobs I did really want that were missing. Luckily switching registrars is much easier than it was in the Dark Ages …