Archive for January, 2012
Removing pesky UITableView lines
You know how, if you have a UITableView with only a few entries, how the divider lines for the empty (non-existent) cells still show up? This happens to me every once in a while, and every time I always have to go look up the solution. Well in case you’re wondering, it’s as easy as one line of code:
mTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
And that’s it. Happy coding!
Slide-Away Screens
In an app I’m working on now I thought I’d give the slide-away screen metaphor a try. Like the one found in the Path and Facebook apps. So I went online and sought a library that could do that for me. Many of the libraries I found were actually for the iPad, and mimicked the behaviour of the Twitter app. Close, but not what I wanted. I found a few libraries, but many of them didn’t support swiping. They were only controlled by a button or some other event.
Finally I found DDMenuController, which seemed to fit what I wanted to do. I experimented with it a bit, and it was easy enough to use. I could also tweak the source code to change how much of the “underneath” controller would show. This was important because I only wanted to show a narrow strip of controls, which isn’t very wide. But soon enough I discovered bugs. Often on a swipe, the underneath controller wouldn’t show at all, but rather it would just be black. I fiddled with the source code a bit and finally got that to happen a lot less often. But when I added a second underneath controller on the right side, the problem came back with a vengeance, and at that point I just gave up.
I looked around again, and found a library I didn’t find the first time. It’s called ViewDeck. So far, I haven’t encountered any bugs, which is good. But I haven’t yet found a way to change how far the main screen moves over. Well, that’s not quite true. I did find something for that, but when I set it to a value I like, the main screen just bounces back and doesn’t stay in the slid-over position. So I’m going to play around with it a little bit and post an update with what I found.
UPDATE 1: I found the solution. It’s just a matter of making sure the rightLedge is large enough to trigger the left edge to stay in place. I’m hoping this works out later when I’ll want a small left underneath view and a large right underneath view.
UPDATE 2: As it turns out, trying to have a large right view was problematic. But I changed the source code to fix that. In (void)panned:(UIPanGestureRecognizer*)panner there’s a divsion by 3.0. I changed that to 4.0 and that made it work.
Sweating the Details
My wife gave me the Steve Jobs biography for Christmas, and I read it throughout the next several weeks. Two things struck me about Steve Jobs. The first was that he was not a pleasant person. I kept hoping that Walter Isaacson would report that Steve mellowed out over the course of his life and started treating people as they deserved. That didn’t happen, and it disappointed me.
The second thing that struck me was how much Steve sweated the details. Every little detail had to be just right. Insanely great. The exact colour of beige used for the computer case. The perfectly fitted edges. The lack of (or at least minimal use of) screws. The control of the product from hardware to software and everything that entails. This has prompted me to take a look at my own attention to detail, and while I believe that Steve Jobs’ level of passion in this regard is not something I necessarily have to emulate, I think that I’ve been cutting the corners a bit too much in my work.
My oldest iPhone app that I have on the store, Crate 33, isn’t bad, but I know of a few areas that need improvement that I’ll be addressing. These include the terrible name and icon. I did a much better job on my second app, iBorrow. I’m quite proud of it. But I can think of at least one button that needs some TLC, and one function that should be removed. I’ve also started work on my next app, and I’m trying to make it even better. Since I’m not a graphic or UX designer by any stretch of the imagination, and I can’t afford to hire one, making the app look perfect is quite problematic. I’m learning, however, and I hope that I can come up with something really nice.
I really appreciate the polish and detail that my favourite apps have, and I’m going to strive much harder to do that in the iPhone work I do every day.