Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Apple make its controllers contain other controllers?

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?

like image 314
Casebash Avatar asked Sep 23 '10 01:09

Casebash


People also ask

Does Apple support Nintendo controller?

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.

Do Xbox controllers work on Apple?

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.

Are there controllers for iphones?

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.


1 Answers

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.

like image 182
Matt Williamson Avatar answered Oct 02 '22 22:10

Matt Williamson