Thursday 15 January 2015

ios - Darken an opaque UIView without blending -



ios - Darken an opaque UIView without blending -

my app's background opaque uiimageview. under circumstances darken downwards in animated way total brightness 50%. lower alpha property of view , works well. because nil behind view, background image becomes dark.

however, i've been profiling using core animation instrument , when this, see the whole background shows beingness blended. i'd avoid if possible.

it seems me achievable during compositing. if view opaque, possible mix black without behind showing through. it's not necessary blend it, adjust pixel values.

i wondered if uikit's gpu compositing supports. while blending isn't great, it's lot improve updating image on cpu, think cpu approach not substitute.

another question asks this, , few ideas suggested including setting alpha. no 1 has brought mechanism avoiding blending though.

an of import question here whether want alter using darkened background animated.

not animated

prepare 2 different background images , swap between them. uiimage+imageeffects library help generating darkened image, or give leads.

animated.

take @ gpuimage - "an open source ios framework gpu-based image , video processing". based on render background in scene in darkened way.

ios uiimageview uikit opacity alphablending

No comments:

Post a Comment