Custom UITableViewCell Layout

At work we were trying to create a custom UITableViewCell. We wanted something that looked like this: Here are some of the factors that made this problem more difficult: Our one custom cell was in a UITableView of regular cells The fonts for each of the items in the cell were pretty consistent with the rest of the table view Like every other cell, we wanted to it to be indented based on cell.separatorInset I looked at several ways to approach this. I tried using a custom table view. I tried subclassing a UITableViewCell. I finally landed on trying to override the tableView:willDisplayCell:forRowAtIndexPath: and it is worth explaining why. ...

December 27, 2013 · zacharyzacharyccom

Screening The Past

It’s been over a year since I left my roll at Motorola working with a team of very talented web developers on Montage. During my time with that group I worked on a side project for automated testing called “Screening”. I wrote a couple of posts (or at least one post) about chromedriver which we used to power screening. Still, one of the big personal accomplishments for me during that time was being published at Ars Technica. I was one of three authors on a post about the tools we were working on. The project has since been abandoned, but you can read about it here. ...

November 28, 2013 · zacharyzacharyccom

Properties in C#

I’m a new C# programmer. I’m using it for a project at work. Doing an ASP.NET MVC project. So far I’ve been very happy with the language. It has some nice stuff built in. ASP.NET MVC is pretty nice too. It’s almost as easy to use as rails. So, all in all, I’m pretty happy, but today I ran into something stupid. I have a method that is trying to do a TryUpdateModel(model, new[] {"prop1", "prop2"}); call and my model wasn’t getting updated. I checked out the associated FormCollection and sure enough my values were in it. The problem was in how I was defining my model. ...

March 2, 2011 · zacharyzacharyccom

Sleeping your Mac with a Microsoft Ergo 4000 Keyboard

One of my friends, who will remain nameless for the purpose of this discussion, convinced me start playing around with a Microsoft Natural Ergo Keyboard 4000. I got one at work, then I bought one for the home and I’ve been pretty happy with it. There are just a couple of things missing from my standard mac keyboard. Firstly, on my old computer, I used to be able to hit the a keyboard combination to get my machine to sleep. I believe it was something like Cmd – Shft – Eject. Well, the Microsoft keyboard doesn’t have Eject. So I’m out of luck there. It does, however, have a set of buttons reserved for favorites. So I decided to code up a little AppleScript and bind it to one of these keys. Here’s the script, and I just saved it as an editable application. Then you can go into the preference pane for the keyboard and assign the whichever key you want to this script. Good luck. ...

October 25, 2010 · zacharyzacharyccom

Support Pastie

One of the best web apps I’ve ever used: Pastie is doing a casual donation. I’m going into the new year and am trying to really conserve my spending, but if you can afford to toss a few bucks this way, it’s a great cause

January 2, 2009 · zacharyzacharyccom