Recall & Review
beginner
What is a swipe action in iOS apps?
A swipe action lets users swipe a list item left or right to reveal buttons for quick tasks like delete or edit.
Click to reveal answer
beginner
Which UIKit class helps you add swipe actions to table view rows?UIContextualAction is used to create swipe actions that appear when a user swipes a table view row.
Click to reveal answer
intermediate
How do you specify the style of a swipe action button in Swift?
You set the style property of UIContextualAction to .normal or .destructive to change its look and behavior.
Click to reveal answer
intermediate
What method do you implement to provide swipe actions for a UITableView row?
Implement tableView(_:trailingSwipeActionsConfigurationForRowAt:) or tableView(_:leadingSwipeActionsConfigurationForRowAt:) to return swipe actions.
Click to reveal answer
beginner
Why should swipe actions be accessible?
Making swipe actions accessible ensures all users, including those using VoiceOver or other assistive tech, can use the app easily.
Click to reveal answer
Which class creates a swipe action button in a UITableView?
✗ Incorrect
UIContextualAction is the class used to create swipe action buttons for table view rows.
Which method provides trailing swipe actions in a UITableView?
✗ Incorrect
tableView(_:trailingSwipeActionsConfigurationForRowAt:) returns the swipe actions shown when swiping from right to left.
What style makes a swipe action button red and destructive?
✗ Incorrect
The .destructive style colors the button red to indicate a destructive action like delete.
Swipe actions are usually added to which UI element?
✗ Incorrect
Swipe actions are added to UITableViewCell to allow quick actions on list items.
Why is accessibility important for swipe actions?
✗ Incorrect
Accessibility ensures users with disabilities can use swipe actions with assistive technologies.
Explain how to add a delete swipe action to a UITableView row in Swift.
Think about the method that provides swipe actions and how to create a red delete button.
You got /4 concepts.
Describe why swipe actions improve user experience in mobile apps.
Consider how users interact with lists and want fast ways to manage items.
You got /4 concepts.