In my application while designing the UI i am facing some UI Issue.
The Top contraints
I am setting in story board are coming same in IOS 11
but in versions lower to that UI is moving up. Please see the attached image
As you can see image in IOS 10
is above from the one in IOS 11.2
.
How I can have the same UI in all the versions.
Contraints I have added are below:
Any help would be highly appreciated.
Adding below line in my view controller solved my problem.
edgesForExtendedLayout = UIRectEdge.init(rawValue: 0)
It appears that in iOS 10
and below my view was going under the navigation bar which made to look that view has shifted up. But it was working all fine in iOS 11
. So to avoid view controller to go behind any bars added the above line which solved my problem.