April 2021
Beginner to intermediate
506 pages
11h 57m
English
At the moment, when you switch from portrait to landscape mode, the on-screen controls are located outside of the camera’s viewport. The same is true when the player navigates beyond the view. You will fix both of these problems now.
You first need to implement something similar to what you did in Working with Different Screen Sizes to help you find the edges of the view. However, instead of making an extension that uses methods to return values, you’ll create an extension that uses computed properties, as they’re more efficient and help to produce cleaner, more succinct code.
Create a new file using the iOS Swift File template. Name this new file SKScene+ ...
Read now
Unlock full access