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.
Thanks
Arnieterm
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);
Arnieterm