0

I manually set my UIButton's background by using the following:

[button setBackgroundImage:[[UIImage imageNamed:@"button.png"] stretchableImageWithLeftCapWidth:10 topCapHeight:0] forState:UIControlStateNormal];

On the simulator this looks fine, however on the device it looks horrendous. It looks like this:

image

I'm not entirely sure what's causing this. I do have an autoresizing mask set (UIViewAutoresizingFlexibleWidth), but disabling it still causes this.

Matt S.
  • 13,305
  • 15
  • 73
  • 129

1 Answers1

1

Somebody else on stack overflow was getting stretch artifacts because of a "Compress PNG" files" project setting. How is your's set?

Community
  • 1
  • 1
danh
  • 62,181
  • 10
  • 95
  • 136