© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
W. WangBeginning iPhone Development with SwiftUIhttps://doi.org/10.1007/978-1-4842-7818-5_12

12. Using Alerts, Action Sheets, and Contextual Menus

Wally Wang1  
(1)
San Diego, CA, USA
 

Almost every app needs to display and accept data from the user. The simplest way to display data is through a Text view, but sometimes you need to display data and give the user a way to respond. In that case, you can use an Alert or an Action Sheet. Yet another way to display options to the user is Contextual Menus.

An Alert pops up on the screen, giving the user a chance to respond. Then users can dismiss the Alert by tapping one or more buttons as shown in Figure 12-1.
Figure ...

Get Beginning iPhone Development with SwiftUI: Exploring the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.