The Apple documentation gives the following warning regarding using View Controllers to manage part of a screen.
Note: You should not use view controllers to manage views that fill only a part of their window—that is, only part of the area defined by the application content rectangle. If you want to have an interface composed of several smaller views, embed them all in a single root view and manage that view with your view controller.
Now the strange thing is that Apple breaks this advice. UITabBarController, UINavigationController, UISplitViewController all go against this advice. There is a discussion on the Apple forums about what can go wrong if you ignore this advice.
I found a tutorial on how to do this, but the method had a problem with overlapping the status bar which had a fix that seemed kind of dodgy. Other questions have solutions that appear kind of dodgy or advise against doing it.
So given the question is what method does Apple use for its own controllers?
Apple has introduced Nintendo controller support in iOS 16, iPadOS 16, and tvOS 16, so it is now possible to pair Joy-Cons to your devices.
Pair and connect the controller Press the controller's Xbox button to turn the controller on. Press and hold the controller's Connect button for a few seconds to put the controller into pairing mode. This makes it discoverable by your Apple device.
Luckily, there are many great controllers available for iOS gamers. If you're gaming on your iPhone, look no further than the Razer Kishi. Designed to fit almost every phone on the market, the Razer Kishi offers low latency, a sleek, ergonomic design, and compatibility with many Apple Arcade games.
They also say not to use autorelease pools, but there are autorelease
statements throughout their samples. Stick with what's practical. Purity should probably be slightly secondary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With