Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
hi all,

i have some content drawn already in the view. i am trying to draw a line on it for touchesmoved. the problem is when it draws using drawrect method, it erases the entire content, how can i save previous context and only draw this line ?

regards
 
If you want to save anything in a drawing context, you have to create the context yourself, perhaps from a bitmap that you have allocated.

UIViews are not guaranteed to save anything drawn into in their drawing context once that drawing is sent to the display. So don't use a UIView for drawing if you want to draw over persistant content.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.