Make your iPad app more like a Mac app by taking advantage of system features in macOS.
The Mac version of your iPad app supports many system features found in macOS without requiring any effort from you. These features include:
A default menu bar for your app.
Support for trackpad, mouse, and keyboard input.
Support for window resizing and full-screen display.
Mac-style scroll bars.
Support for system Touch Bar controls.
You can, however, extend your app to take advantage of even more system features.
Add Menu Bar Items
The Mac version of your app comes with a standard menu bar. Customize it by adding and removing commands and command groups using
Show a Preferences Window
Mac apps typically let users manage app-specific settings by displaying a preferences window. Users see this window by selecting the app menu followed by the Preferences menu item in the menu bar. If your app has a Settings bundle, the system automatically provides your app with a preferences window. To learn more, see Displaying a Preferences Window.
Apply a Translucent Background to Your Primary View Controller
iPad apps using a split view controller get a Mac-style vertical split view when running in macOS. But to make your iPad app look more at home on Mac, apply a translucent effect that blurs the desktop into the primary view controller's background. To do this, set your split view controller’s
UISplit, as shown in Listing 1.
Detect the Pointer in a View
Mac users rely on a pointer to interact with apps, whether selecting a text field or moving a window. As the user moves the pointer over UI elements, some elements should change their appearance. For example, a web browser highlights a link as the pointer moves over it.
To detect when the user moves the pointer over a view in your app, add a
UIHover to that view. This tells your app when the pointer enters or leaves the view, or moves while over it.