0
0
iOS Swiftmobile~5 mins

Swipe actions in iOS Swift - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AUITableViewCell
BUISwipeGestureRecognizer
CUIContextualAction
DUISwipeAction
Which method provides trailing swipe actions in a UITableView?
AtableView(_:trailingSwipeActionsConfigurationForRowAt:)
BtableView(_:cellForRowAt:)
CtableView(_:didSelectRowAt:)
DtableView(_:leadingSwipeActionsConfigurationForRowAt:)
What style makes a swipe action button red and destructive?
A.cancel
B.normal
C.default
D.destructive
Swipe actions are usually added to which UI element?
AUITableViewCell
BUIButton
CUILabel
DUIImageView
Why is accessibility important for swipe actions?
ATo improve app speed
BTo support users with disabilities
CTo reduce app size
DTo add animations
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.