iPhone stretchableImageWithLeftCapWidth only makes "D"s.
Posted
by Jill
on Stack Overflow
See other posts from Stack Overflow
or by Jill
Published on 2010-05-27T19:53:05Z
Indexed on
2010/05/27
20:21 UTC
Read the original article
Hit count: 268
UIImage *aImage = [[UIImage imageNamed:@"Gray_Button.png"] stretchableImageWithLeftCapWidth:25 topCapHeight:0];
Trying to make a "glass pill button".
What does "stretch" do if the image is bigger... and the button I'm trying to use it on... is smaller?
Does the image 'stretch' and 'shrink'?
The reason I ask... is because all my images end up look like a "D" shape.
The left side is squared-off... and the right side is rounded.
What would a D-shape tell you that I'm doing wrong? Too much.. or too little... "leftCap setting"? Too large an image?
© Stack Overflow or respective owner