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

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
Hi
In my iphone application, I have a UIScrollView wherein I am adding UIView dynamically. As I have to draw a chart in each UIView so as a part of this I am using CGContextDrawImage inside the drawRect method of UIView.
My problem is that the background image appears only in case of first UIView added. In subsequent UIViews the image does not appears
I am not able to get what is happening as same code is executing again for subsequent views.

Code:
UIImage* img = [ UIImage imageNamed:@"bg_graph.png"];
	CGContextDrawImage(context, self.frame, img.CGImage);
Thanks
Arnieterm
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.