I have a problem, I created a zoomable UIImageView with a UIScrollview, everything works perfect, exept the UIImageView is not in the center anymore and every time I hide the Tool- and NavigationBar the UIImageView/UIScrollView is moving up.
I already set the autoresizingMask:
scrollView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
scrollView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin;
but it won't work, can someone please help me?
Just like @Mert answered, you can either set it in code
self.automaticallyAdjustsScrollViewInsets = NO;or you can set this in storyboard, in the scroll view in one of the inspectors you can un-check the checkbox that automatically adjusts the scroll view content.EDIT
The checkbox is in the attributes inspector of the
UIScrollView, it's called Autoresize Subviews under drawing section.Btw, this behaviour only happens in iOs7, because of the transparent
UINavigationBarthing.