qwzybug
qwzybug

Reputation: 553

Problems making an UIImageView opaque on the iPhone

Doing as little alpha blending as possible is an important performance consideration for table view cells on the iPhone. I have table cells that are largely comprised of one big image view. I have set the UIImageView to be opaque, in both Interface Builder and programmatically, but the CoreAnimation instrument still shows that it is being alpha-blended.

Is there a way to make UIImageViews actually opaque, or am I going to have to do custom drawing to keep from blending?

Upvotes: 6

Views: 3602

Answers (2)

Louis Nguyen
Louis Nguyen

Reputation: 304

It's likely that your image contains alpha channel. Although the image is opaque, iOS still treats it as semi-transparent. Try to remove this alpha channel using Photoshop by going to: Layer > Background From Layer

Upvotes: 5

Greg
Greg

Reputation: 9168

[yourImageView setOpaque:YES];

Upvotes: 0

Related Questions