Blog

Thoughts on mobile app development.

Developing with a Magic Trackpad

As I don’t own a laptop, I’ve always felt that by using a mouse that I was missing out on some of the nice touch features of OS X. The Magic Trackpad is the obvious solution, but I was never able to get over  that sceptical feeling of how well it would work as a mouse replacement. Since I have several Magic Mouses (Magic Mice?) lying around already, when I bought a new iMac recently I decided to get the trackpad instead. I commited to trail it for two weeks, and if I was still finding it difficult at the end of that period, I’d go back to the trusty mouse. Those two weeks are now up, so here’s my verdict.

The first thing I noticed is that the transition was really quite natural. I have used Apple laptops before so it’s not like I’ve never used a trackpad, but I think all those years of performing gestures on iOS devices just made me feel instantly at home with the trackpad. I was fully expecting to spend at least a few days feeling hindered, but the truth is I was up and running at normal speed almost instantly. All I needed was a little messing around in System Preferences to get the cursor speed correct. The gesture demonstrations in the System Prefs are excellent, and really make it clear what gestures are available.

If you’re not too picky, then that’s really it. Developing in Xcode is great, navigating the OS is fun, and everything just works. Even doing the occasional touchups or cuts in Photoshop works just fine, though I’m not sure how well it would be for someone who spends all day designing pretty things.

If you are picky like me, then there’s two things which may bug you. The first is creating IBOutlet connections in Xcode. I love the ability to drag connections that was first introduced in Xcode 4, and would always do this by right-click and dragging. However, I can’t find a way to make this work with the Magic Trackpad. The only way I’ve found to make connections so far is to hold down the Control key, and perform a 3 finger drag. A little cumbersome, but not that big of a deal.

The other issue I came across is not so much of an issue as it is more of a side effect. When dragging things around with a trackpad, you will inevitably sometimes reach the edge of the trackpad before you’ve fully dragged the item to it’s destination. Imagine dragging a file from one side of the screen to another – chances are you reach the edge of the trackpad first unless you’re quick. To combat this, the trackpad gives you a little bit of time to readjust. For example, you can drag a file halfway across the screen, lift your fingers off the trackpad and move them back to the other side, and continue dragging. As long as you’re quick enough, this works great. The problem comes in when testing apps in the iOS Simulator. Often you’ll need to swipe or scroll, and because of the way the drag detection works, once you finish your swipe/scroll the screen sticks there for say a tenth of a second – just long enough for the OS to decide that you’re not trying to continue the gesture. Imagine scrolling a UITableView, and see it stick for just a little bit of a time after you finish scrolling. This really isn’t a big deal, as long as you test on a device and confirm that this stickiness is not just bad code!

So, all in all, I love the Magic Trackpad, and I’m sticking with it. If you decide to give one a try, spend a few minutes familiarising yourself with all the gestures that aren’t possible with the Magic Mouse. There’s quite a few. You also might want to consider installing BetterTouchTool. It gives you a high level of customisation over how your trackpad behaves. Currently I’m only using it to alter Safari’s behaviour when tapping on links – basically if I perform a 3 finger tap, it opens links in the background.


Enjoyed this post? Subscribe via RSS or follow me on Twitter.

10 Comments

  1. Nice article, and like you, had a Magic Mouse and decided to try the trackpad and never looked back.

    For your IBAction problem, have you tried the slow double-tap gesture, the same you’d use to resize or re-position a window?

    Hope that helps,

    Ray

    Reply
    • Thanks Ray – I was really surprised by how much I like it.

      I’m a bit confused about the slow double tap – how would you use that to make a connection?

      Reply
  2. Not quite sure what’s happening for you with IBOutet connections… I use a trackpad exclusively in Xcode and the control key plus a single-finger drag works perfectly fine.

    Reply
    • I think I was mainly after the ability to make connections without the keyboard, just like right-click dragging does with the mouse.

      Reply
  3. Maybe I am misinterpreting something here, but it sounds like you don’t have the hard click enabled on your Magic Trackpad (or you don’t use it). If you click with your thumb and drag with your index finger, it would behave *just* like a laptop’s trackpad, and if you reached the edge of the trackpad, you’d simply lift your index finger, move it back to the middle, and continue.

    Reply
    • You’re right, hard click bugs me :) Good tip though, thanks!

      Reply
  4. I use a Magic Trackpad exactly to do what you want. Its Two finger drag instead of one (Equivalent to control drag on the mouse)

    I love my Magic Trackpad…. (Odd for me as I’n a PC/Mouse man)

    a

    Reply
    • Seems like everyone else has this working except for me, so it must be something to do with my settings. I’ll have to dig into it further.

      I guess I used to be a Mouse man too!

      Reply
  5. I LOVE my magic trackpad – which is so weird for me, because I always preferred mice over everything. Lion changed that a lot for me – I was forced to use my laptop exclusively for a period of time and found myself missing the laptop trackpad when I got back.

    Anyway, you can totally do both of the things you were asking for; I do them everyday.

    IB Connections: If you have Secondary Click turned on in System Prefs, clicking with two fingers will be like a right click on the mouse – no ctrl key necessary. So you two finger click and then just hold one finger down and drag the connection over.

    “Skating”: As Paul pointed out, you can just hold one finger down and use another finger to move – lifting and moving again when necessary.

    It might be that this requires hard-click to do it either or both, however. I’d say give hard click another chance. Apple has done an awesome job of getting the feel just right (IMO).

    Reply
    • Not sure why but I just don’t have any luck, even with hard-click turned on. I have Secondary Click enabled, but holding down one finger and moving the other always drags the control, rather than creating a connection.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *