CGAffineTransformMakeScale and CoreGraphics
I've got a UIView overriding the drawRect: method.
Now, when I'm doing
view.transform = CGAffineTransformMakeScale(recognizer.scale,1.0);
everything scales; the view itself as well as everything drawn on it.
But now I would like to only scale specific things drawn on it. Is it possible to draw to e.g. draw to two different layers and then scale only one specific layer?
Unfortunately, it's no option to take different views - that's performing a lot worse, I tried... (large UIScrollView with view above it, draw in the view above scrollView - scrolling is slow then - but if I draw to the UIScrollView directly, it performs good).
Thanks a LOT!
EDIT The second approach:
- UIWindow -- UIView --- UIScrollView <== this view should NOT resize in Transformation ---- UIView <== here, I draw some开发者_StackOverflow things on with CoreGraphics <== should be resized in TransformationThe view with core graphic objects on it has the same size as the UIScrollView.contentSize and always gets setNeedsDisplayInRect when the scrollview is scrolled... but for me, it's much slower...
精彩评论