Stretchable images in UIImageView using IB only

15,063 views
14,560 views

Published on

So maybe you wonder if there’s any way to use stretchable images without coding, but using Interface Builder only...

http://mystcolor.me/post/22037318992/stretchable-images-in-uiimageview-using-ib-only

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
15,063
On SlideShare
0
From Embeds
0
Number of Embeds
591
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Stretchable images in UIImageView using IB only

    1. 1. Stretchable images inUIImageView using IB only iOS Development tips
    2. 2. Prepare your stretchable image, say 29x13 pixels, we use x=22, y=5 for our example
    3. 3. Open your xib file with UIImageView ready
    4. 4. Assign the image property to your UIImageView
    5. 5. Change the View property•Mode: •Scale To Fill•Stretching: •width, height = 0 •X = 22/29 = 0.75862069 •Y = 5/13 = 0.384615385 29 x 13 (22, 5)
    6. 6. Done without a single line of code!
    7. 7. James Tang @mystcolorhttp://mystcolor.me

    ×