I have created a UIScrollView (canvas.scrollview) and have a custom UIView (canvas) inside it.
A normal configuration for starting up is something like this:
CGRect cs2 = CGRectMake(0, 0, 4000, 4000); CGPoint screen = {[UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height};
self.canvas.frame = cs2; //canvas_size;
self.canvas.scrollView.contentSize = canvas_size.size; self.canvas.scrollView.contentOffset = CGPointMake(canvas_size.size.width/2-screen.x/2, canvas_size.size.height/2-screen.y/2);
But I have noticed that when I set the scrollview content size to a larger value such as 4000,4000; it will use a lot more memory. For example:
scrollview view real virtual
1000,1000 1000,1000 6 88
4000,4000 1000,1000 62 145
1000,1000 4000,4000 6 88
I would like to have a fairly large working area if possible, but 8000x8000 completely foobars the memory. Any idea why the scrollview would use up so much memory, and is there a way to fix this?