Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Ti.UI.Switch boundary dimensions

Anyone noticed that the Ti.UI.Switch boundary dimensions seem to extend beyond what the graphic would indicate? Giving it size (or width/height) properties don't seem to do anything at all. You can actually touch outside of the area that the switch occupies and it still toggles the switch. This is problematic if you're putting UI elements near one another. :(

— asked July 6th 2010 by Christopher Rumpf
  • boundary
  • dimensions
  • switch
0 Comments

1 Answer

  • I don't see that behavior either on the device or in the emulator - can you break it down to a simple example? Maybe there's something else at play?

    — answered July 6th 2010 by Kevin Whinnery
    permalink
    1 Comment
    • Thanks for replying, Kevin. I was just looking at the Kitchen Sink, for example. (I'm using mobilesdk 1.3.2 and iPhone SDK 4.0). If you go to the Controls tab and choose the Switch table option you can see the example of the basic switch. Notice that you can touch the screen somewhere in a halo around 10 pixels from where the actual switch image is an still invoke the toggling of the switch. This is a lot easier to do on the simulator because you can point more precisely with the mouse than you can with your finger on a device.

      — commented July 6th 2010 by Christopher Rumpf
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.