-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

iOS 17 Programming for Beginners
By :

As you have seen earlier, the table view in the Journal List screen presents table view cells using rows arranged in a single column. This works great on an iPhone, but as you have seen, this results in a lot of wasted space if you were to run the app on an iPad. Even though you can use the same user interface for both iPhone and iPad, it would be better if you could customize it to suit each device.
To do this, you’ll add some code so your app can identify the size of the screen it’s running on, and you’ll dynamically modify the size of the collection view cells in the collection view to suit. You can identify the current screen size using size classes, and you’ll learn about them in the next section.
To determine the size of the screen your app is running on, you must consider the effects of device orientation on your user interface. It can be challenging...