iPhone acceptance and other surprises

Running an application for the first time on an iPhone/iPod touch is truly rewarding. After months of testing in a simulator, it’s great to finally be able to build for the real device.

I spent some time with UITextFields today and thought I should share my discovery. Apparently controls that track touch movements don’t work quite right when embedded in a UIScrollView. The solution: disable scrolling on the enclosing view when making the control first responder (or right away if scrolling is not necessary). I found the solution in the UICatalog example after scanning over the source code 5 or 6 times.


~ by lucasgladding on July 15, 2008.

One Response to “iPhone acceptance and other surprises”

  1. Many thanks, this was a VERY useful hint!

    I’ve been struggling for days with a custom UIControl derived control which needs touch tracking. I now temporarily disable scrolling of the UITableView which displays my control – now it works!
    Curiously, UISlider works on a UIScrollView without any dirty tricks (at least no visible ones). For a test, I derived my control from UISlider instead of UIControl, and then it got the touch tracking (however the visuals were not usable). I could not find out what UISlider does to make the tracking work…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: