0
votes

I've seen that with iOS7 when using a UIScrollView and a navigation controller the scroll view has to be all the way at the top of the view. Or the label or image will not be in the right spot when the app is run as seen in this question iOS 7 Navigation Bar and Scroll View are different in storyboard and simulator.

I am wondering is there a way around this. I am setting my scrollView like this:

viewController.h

@property(nonatomic,weak) IBOutlet UIScrollView *scrollview;

viewController.m

- (void)viewDidLayoutSubviews {
    [scrollview setContentSize:CGSizeMake(0, 1000)];
}

My question is is there a way around this using ios7 and auto layout? Or do I just have to live with it looking weird in the storyboard?

Thanks in advance for the help.

1

1 Answers

0
votes

In the Attributes Inspector, under Simulated Metrics, you can change Top Bar to None. This will simulate your view controller having no navigation bar while viewing in Storyboard. When the application is actually ran, the navigation bar will appear.