Skip to content

Remove manual view lifecycle calls from presentation controller#27

Merged
OhKanghoon merged 1 commit into
mainfrom
refactor/remove-manual-view-lifecycle-calls
Nov 27, 2025
Merged

Remove manual view lifecycle calls from presentation controller#27
OhKanghoon merged 1 commit into
mainfrom
refactor/remove-manual-view-lifecycle-calls

Conversation

@OhKanghoon

Copy link
Copy Markdown
Owner

Summary

This PR removes explicit beginAppearanceTransition and endAppearanceTransition calls for the presenting view controller in FloatingBottomSheetPresentationController.

Motivation

As a standard modal presentation, UIKit automatically manages the presenting view controller's lifecycle. Manually calling appearance transition methods is non-standard and can lead to:

  • Unexpected behavior in the presenting view controller's lifecycle
  • Potential conflicts with UIKit's automatic lifecycle management
  • Maintenance issues due to non-standard implementation

Changes

  • Removed beginAppearanceTransition(false, animated:) calls in presentationTransitionWillBegin()
  • Removed endAppearanceTransition() call in presentationTransitionDidEnd(_:)
  • Removed beginAppearanceTransition(true, animated:) calls in dismissalTransitionWillBegin()
  • Removed endAppearanceTransition() call in dismissalTransitionDidEnd(_:)

Impact

This change aligns the implementation with UIKit's standard modal presentation behavior. The presenting view controller's lifecycle will now be managed automatically by UIKit, as expected in standard modal presentations.

Remove explicit beginAppearanceTransition and endAppearanceTransition calls
for the presenting view controller. As a standard modal presentation,
UIKit automatically manages the presenting view controller's lifecycle,
making manual calls unnecessary and potentially problematic.

This change aligns the implementation with UIKit's standard modal
presentation behavior and removes non-standard lifecycle management.
@OhKanghoon OhKanghoon self-assigned this Nov 27, 2025
@OhKanghoon OhKanghoon added this to the 3.1.0 milestone Nov 27, 2025

@cheonsong cheonsong left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 👍

@OhKanghoon OhKanghoon merged commit 96a2221 into main Nov 27, 2025
1 check passed
@OhKanghoon OhKanghoon deleted the refactor/remove-manual-view-lifecycle-calls branch November 27, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants