Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Clear Graphics Context" means?

Tags:

ios

uiview

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?

like image 460
SeanFang Avatar asked Apr 28 '12 08:04

SeanFang


2 Answers

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.

like image 147
Reshat Belyalov Avatar answered Sep 22 '22 22:09

Reshat Belyalov


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); 
like image 36
Antoine Rosset Avatar answered Sep 24 '22 22:09

Antoine Rosset