I'm displaying opaque PNGs with UIImageViews inside of a superview with a white background color. What's best for performance?
UIImageView Defaults
opaque = NO, backgroundColor = nil, clearsContextBeforeDrawing = YES.
iOS Developer Library: UIView Class Reference
UIView Class Reference: backgroundColor says, "[
nil] results in a transparent background color." If I set aUIViewsopaqueproperty toYES, must I also set itsbackgroundColorto[UIColor clearColor], or is that extra line of code & processing unnecessary? I.e., is[UIColor clearColor]considered opaque (not transparent)?Does the value of
clearsContextBeforeDrawingmatter for opaque views?The comments for
clearsContextBeforeDrawinginUIView.hsay it's ignored for opaque views.But, UIView Class Reference: clearsContextBeforeDrawing says:
If the view’s
opaqueproperty is also set toYES, thebackgroundColorproperty of the view must not benilor drawing