UISearch layout is different on different iPhones

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



UISearch layout is different on different iPhones



On my storyboard, I add a UISearchBar and below that I added a table view. On iPhone 8, I am seeing the UISearchBar right below the navigation bar/header and on iPhone 5s and on iPad and I seeing some space between navigation bar/header and the UISearchBar.



Image showing iPhone 5s on left and iPhone 8 on right:
enter image description here



UISearchBar on ViewController on the storyboard
enter image description here



UITableView on ViewController on the storyboard
enter image description here



Constraints on that view
enter image description here



Any idea what could be happening?





Do you have a constraint for the top of the search bar?
– Matthew Bradshaw
17 mins ago




1 Answer
1



Did you check it without UITableView?
Maybe it changes its position only seemingly?
Go to simulator -> window -> unmark 'show device bezels' and add 'pixel accurate' ( cmd + 2)






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard