ios - CGContextClearRect ignores alpha value set in storyboard -
i'm using cgcontextclearrect method in myview's drawrect clear myview background color. however, must explicitly set background color alpha value of myview in code. if set alpha value in storyboard, cgcontextclearrect makes myview black. why alpha value set in storyboard doesn't trick?
the drawrect method allows reset view's layer content when flagged refresh. there's no need call cgcontextclearrect clearing layer automatically managed system before calls drawrect method, providing blank canvas view's layer.
Comments
Post a Comment