0
votes

Tab bar Controller launch time first-view-Controller view position down 20px After going to next controller came to first viewcontroller view position goes up 20px ,I am using storyboards

when launch time first view Controller when launch time first view before tab to next

after tab next and came to same tab after tab next and came to same tab

How to clear space between navigation bar and view

TabControler setup in storyboard enter image description here

2
show your storyboard setup instead of these ? tell me if you have scroll view on first tab? - Pawan Rai
What are your simulated bar metrics in xib/storyboard? - Eyeball
I guess you might have set topLayoutGuides of the two viewControllers differently which associated with first and the next tab. Please check both are properly set. - Rameswar Prasad
@pawan i want to use scroll view but not now ,i add your asked info - Muralikrishna
@ILikeIOS try with goto -> TabControler setup in storyboard ->view controller (as i can see here) -> un check adjust scroll view insets. - Pawan Rai

2 Answers

0
votes

Try unchecking 'Adjust Scrollview Insets' on Storyboard or do it programmatically in 'viewDidLoad':

if #available(iOS 11, *) {
    myScroll.contentInsetAdjustmentBehavior = .never
} else {
    self.automaticallyAdjustsScrollViewInsets = false
}
-3
votes

That could be a bug in iOS7. Try switching off autolayout.