`presentActionSheet` is getting an empty frame for animation
davidleee opened this issue · comments
I am playing with the demo on iPhone 13 Pro simulator with iOS 15.4.
Happens to find that the sheets don't seem to slide in from all the way down, but the animation looks fine while sliding out.
Here's what I mean with slow animation on:
After some debugging, I narrowed down to an empty frame in ActionSheetStandardPresenter:
open func presentActionSheet(completion: @escaping () -> ()) {
guard let view = actionSheet?.stackView else { return }
let frame = view.frame // this is an empty, all zero
view.frame.origin.y += frame.height + 100
let animation = { view.frame = frame }
animate(animation, completion: completion)
}
Wondering if this is an intended behavior?
Hi @davidleee
It's not intentional :) Do you have an idea how to fix it?
Hi @davidleee
It's not intentional :) Do you have an idea how to fix it?
Well, I've fixed it for my own use case. Will try to make a PR but it will take some time.
That would be great, otherwise you can just post the code and I'll fix it.