Chapter 6: Presenting Extra Information to the User
When interacting with mobile applications, users require a certain level of handholding. For example, suppose they are about to perform an irreversible action such as permanently deleting a file. In that case, they should probably be shown an alert asking for confirmation if they want to proceed with the action. Then, depending on the user's response, the file would be deleted or left alone.
Since SwiftUI is a declarative programming language, presenting extra information to the user mainly involves adding modifiers to already existing views. It is possible to add one or several such modifiers to a View and set the conditions for each trigger. In this chapter, we will learn how to present extra ...
Get SwiftUI Cookbook - Second Edition 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.