1

As A Begineer I've made a Puzzle game and it's working fine in Iphone Simulators.

enter image description here

But problem occurred when I run it in bigger Screen like IPad Air 2.All the picture aren't fitting perfectly in the buttons

enter image description here

(Note that Images are applied on buttons not in the Background of buttons)

Cristik
  • 30,989
  • 25
  • 91
  • 127
tryKuldeepTanwar
  • 3,490
  • 2
  • 19
  • 49
  • 2
    Hi Kuldeep, As image size smaller compare to button width and height. If you do try set background image .. it will stretch out – SachinVsSachin Jun 02 '16 at 05:52
  • That's a good suggestion. Appreciate that but the problem is my game is working on the principle where I give title to all the button's like 1 to 8 and put a title 0 and if any of the button is clicked it'll check wheather 0 is around the button or not and if 0 is present they will switch there title and and in that condition I put Images to switch with the titles.Soo the point is if i Apply Image in Background now all the title will start appearing in front of buttons. – tryKuldeepTanwar Jun 02 '16 at 06:02

1 Answers1

1

As image size not fit to given size of button, may be due to size concern of aspect fit property of imageview of button. You can try to scale image proportionally to size of imageview of button and get desire result.

You can refer to this link for scale image as proportionally to desired size. scale Image in an UIButton to AspectFit?

Community
  • 1
  • 1
SachinVsSachin
  • 6,401
  • 3
  • 33
  • 39