Titanium Community Questions & Answer Archive

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

Buttons overlapping scaled images

So i'm working on an iPhone app where I have scaled images next to buttons. My problem is that when I scale the images on click the buttons overlap the scaled image. How can I stop this?

— asked November 4th 2010 by Nick F
  • button
  • buttons
  • images
  • iphone
  • overlap
  • scaling
0 Comments

3 Answers

  • Do you want the images to appear over the buttons when they are scaled or do you want to control the max size the images are scaled to?

    — answered November 4th 2010 by Paul Dowsett
    permalink
    1 Comment
    • I want the scaled images to appear over the buttons when they are scaled. Currently the buttons show through the image. Sorry if I wasn't clear before.

      — commented November 4th 2010 by Nick F
  • I've managed to make due by adding a button.hide() and button.show() method to the event listener for the images. I'm not sure if there is a better solution but this works for now.

    — answered November 5th 2010 by Nick F
    permalink
    0 Comments
  • Nick F,

    I think setting the zIndex value to an integer higher than the rest of the views on screen (if you have set their zIndex value) will resolve your issue. It's a common property for all views. See the imageView documentation page for an example.

    Hope this helps

    Hal

    — answered November 5th 2010 by Paul Dowsett
    permalink
    0 Comments
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.