-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Description
Environment: Xcode 12.4 (12D4e)
Language: Swift 5.3.2
Toaster version used: 2.3.0
When using the "Picture in Picture" function on iOS 14 or higher devices, the toast view is not in the normal position.
Error reproduction path:
- Launch the video player(AVPlayer) and activate the PIP mode.
- Change the device orientation to landscape mode.
- Change the orientation back to portrait.
- An error occurred.
When an error occurs, the toast is output in a strange position, regardless of the device's orientation portrait/landscape.
Looking at the code, let containerSize = ToastWindow.shared.frame.size in ToastView's layoutSubviews() is wrong. Originally it should be the device screen size, but it seems to be returned as the size of AVLayer of AVPictureInPictureController.
Metadata
Metadata
Assignees
Labels
No labels
