- Home /
iOS :: increase slider thumb touch area
hi there!
how could I increase the touch area of a scroller thumb on iOS devices, esp. for iPhone 4. the touch area here is a really tiny one...
thnx!
Answer by Gamieon · Jan 25, 2012 at 03:16 AM
I just came across the same issue, and I did a couple things which got it working:
Make a new PNG bitmap for the horizontal slider...but have it mostly be empty space. For example, I made a 512x512 bitmap that has an 84 px thick line in the center, and the rest is just unused space (not black pixels). You can use The Gimp or Photoshop to get the job done.
Make a new bitmap for the horizontal slider thumb. I just rendered a circle in my case. Unlike the bitmap in step 1, you don't need to make the image size much bigger than the visible shape.
In Unity, make a new skin, and assign the bitmap from step 1 to Horizontal Slider -> Normal -> Background. Then assign the bitmap from step 2 to Horizontal Slider Thumb -> Normal -> Background.
Play with the padding, margin, and overflow of both the slider and the thumb until they look good. The nice thing is you can do that while the simulation is running by using the mouse as your "test touch device". If you can move the slider thumb while clicking well above and below the visible horizontal slider, then you're golden.
I'm open to a better solution if anyone has any, though!
Your answer
![](https://koobas.hobune.stream/wayback/20220613052001im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
iOS: how do I make an empty area a tappable target: Ring 2 Answers
Keep camera horizontal with RotateAround 1 Answer
Magnifying Glass Unity iOS 0 Answers
Best way to get to get touch inputs? 1 Answer