Skip to content

Changes for method access level for handle swipe and simplified selector#2

Merged
JerwinPRO merged 1 commit intomainfrom
fix/ME-8481
Jan 8, 2026
Merged

Changes for method access level for handle swipe and simplified selector#2
JerwinPRO merged 1 commit intomainfrom
fix/ME-8481

Conversation

@JerwinPRO
Copy link
Owner

What are the changes:

  • Changed method access level: Changed @objc func handleSwipe to @objc private func handleSwipe - This prevents the method from being called directly from outside the class while keeping it accessible to Objective-C runtime (required for the selector).

  • Simplified the selector: Changed #selector(ZoomAnimatedTransitioningDelegate.handleSwipe(:)) to #selector(handleSwipe(:)) - This is the modern Swift approach and is sufficient since the selector is being used within the same class

Why this work:

  • The private access control modifier restricts direct method calls from outside the class
  • The @objc attribute is retained because the method still needs to be exposed to the Objective-C runtime for the selector-based callback from UIPanGestureRecognizer
  • The selector notation is simplified to just #selector(handleSwipe(_:)) which is cleaner and is the recommended Swift style

@JerwinPRO JerwinPRO self-assigned this Jan 8, 2026
@JerwinPRO JerwinPRO added the bug Something isn't working label Jan 8, 2026
@JerwinPRO JerwinPRO merged commit a803fa7 into main Jan 8, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant