fja
fja

Reputation: 1839

What exactly does the drawRect: method of an UIView object do?

I have read the official documentation and I am a bit confused. Does this method draw the view itself (what we see on the screen)?

Upvotes: 1

Views: 1408

Answers (1)

Chandler De Angelis
Chandler De Angelis

Reputation: 2766

In short, yes. This method is called by the system when a view's backing layer needs to be drawn by the rendering system. This article gives a great explanation of how to method works, and how things are drawn onto the screen in general.

Upvotes: 2

Related Questions