What does "Clear Graphics Context" means?

IosUiview

Ios Problem Overview


In Xcode 4.3, when you choose some UIView object placed in .xib, you can find out there is an option saying "Clear Graphics Context". What does it means?

Ios Solutions


Solution 1 - Ios

> When it is checked, iOS will draw the entire area covered by the > object in transparent black before it actually draws the object.
It is > rarely needed.


Beginning IOS 5 Development: Exploring the IOS SDK, page 81, paragraph3.

Solution 2 - Ios

It will apply an OpenGL "clear context" before starting the DrawRect function of the UIView:

glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSeanFangView Question on Stackoverflow
Solution 1 - IosReshat BelyalovView Answer on Stackoverflow
Solution 2 - IosAntoine RossetView Answer on Stackoverflow