I'm building a UICollectionView where each cell has size of 159x159. When the app runs on ios8 it gives (whatever the simulator i choose : iPhone 4S, 5, 5S, 6, 6 Plus) :
But it has not the same size on iOS7 :
WTF ? Note that even my SearchBar has not the same width on both simulators.
The reason for this is that iOS8 has layout margins whilst iOS7 does not. You have made your constraints of the views to the margins.
The way I would facilitate it is if you want it to look like the iOS8 version in both, then don't constrain the views to the margins, but to the edges themselves, and have a constant space between the views and the edges. If you are using storyboards for the auto layout, then you will notice you can tick either on or off if to constrain to margins or not.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.