subviews do not resize with pinch gestures
I have several subviews added to a UIScrollview. Every thing works fine when swiping left and right, ie the subviews move with the swipe. When I use the pinch gestures the subviews do not zoom in and o开发者_如何学Pythonut with the other contents of the scrollview. Everything drawn in context works fine but the subviews remain the same size but move I think based on the movement of their origins, off screen for example if pinching out.
I am calling...
[scrollView setAutoresizesSubviews:YES];
on viewDidLoad. I have also called...
subView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeigh
for each subview added.
What am I dong wrong, or is this not the way to do it?
Have you declared the delegate functions to resize the view when it is called ?
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView;
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView;
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale;
精彩评论