suyama
suyama

Reputation: 262

Drawing using drawRect: heavy for the performance?

I'm writing a mathematical app where the user can draw several mathematical figures like circles, squares, lines, etc... I'm drawing directly to the screen using the current graphics context, Quartz 2D, UIView and drawRect: method.

I'm not sure about what I'm asking, but is this drawing way using drawRect: every time heavy for the performance (iPhone battery)? Thanks a lot.

Upvotes: 1

Views: 274

Answers (1)

justin
justin

Reputation: 104708

You will need to profile your app's execution under heavy conditions using Instruments in order to answer your question. It may be heavy, or it may be fine. The complexity can vary greatly for a number of reasons. If the interface is visibly lagging/slow, that may indicate your drawing is taking too much time. If you suspect it will be an issue due to complexity, sample often in order to spot and correct issues as they are introduced.

Upvotes: 2

Related Questions