A notification banner that displays text to the player.
- iOS 5.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
Listing 1 shows how to display a notification banner in your game. It constructs a title and message using private methods and then displays the banner. When the banner disappears from the screen, the completion block is called and the code advances to some other part of the game’s user interface.