Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Sep 30, 2023
1 parent 620c529 commit d09a593
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Mlem/Extensions/Swipey Actions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,12 @@ struct SwipeyView: ViewModifier {
// swiftlint:enable function_body_length

extension View {
/// Adds swipey actions to a view.
///
/// NOTE: if the view you are attaching this to also has a context menu, add the context menu view modifier AFTER the swipey actions modifier! This will prevent the swipey action from triggering and appearing bugged on an aborted context menu pop if the context menu animation initiates.
/// - Parameters:
/// - leading: leading edge swipey actions, ordered by ascending swipe distance from leading edge
/// - trailing: trailing edge swipey actions, ordered by ascending swipe distance from leading edge
@ViewBuilder
func addSwipeyActions(leading: [SwipeAction?], trailing: [SwipeAction?]) -> some View {
modifier(
Expand Down

0 comments on commit d09a593

Please sign in to comment.