-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several issues such as Mini view position on ipad pro #7
Comments
Hi, |
Thank you so much for your effort, I'll test it right away. |
Hi, I am currently testing version 2.4. Description: My project is a music player, and MinimizableView is always on. So when the tabView is initialized I have been: struct: TabView: View { init(){ I recorded a video, please check it out if you have time. thank you very much! Link: https://drive.google.com/file/d/19BkcI9iiy16Lnuj8VSLaJ9sekXqZ8lES/view?usp=sharing ————————— There is also a small suggestion, if you think it is suitable, I hope you can add it. describe: For some projects, minimizableView always needs to be opened and does not need to be hidden (similar to Apple Music). If you can add an optional configuration to the initializer, similar to 👇: .minimizableView( |
It doesn't look like this is related to MinimizableView but rather to SwiftUI's changes from one version to the next. .onAppear {
self.miniHandler.isPresented = true
self.miniHandler.isMinimized = true
} |
After I debugged repeatedly, I found the problem, because in the ContentView I obtained the state of the device landscape and portrait by observing [UIDevice.orientationDidChangeNotification]publisher and changed the State value, which caused the View to redraw, which is indeed not the same as "MinimizableView". any relationship. Now I'm adding Observer inside the Class to modify the state so that it doesn't cause the View to repaint without needing to update the state. All is well now, thanks a lot! Oh yes, I actually tried putting the code in "onAppear" before, but it didn't work as expected, so I put it in the initialization. There is another question about Swift UI, I want to ask you, very headache. On swiftUI, create a swipe gesture, and modify the state of the View by sliding some values, similar to "self.miniHandler.draggedOffsetY = value.translation.height", I think this is a matter of course; but in support of promotion high refresh rate The device does not achieve high frame rate and the experience is worse than that of the device with 60Hz screen. Compared with the modal sheet I tried to create and the system's native sheet, you will clearly feel the difference in frame rate. I recorded a video (it may be difficult to perceive the difference in the video). I've googled related questions, but none of them have clear answers. I also tried the high refresh rate request "promotionRequest = FrameRateRequest(preferredFrameRate: 120, duration: 0.45)", but there is still a significant gap in the experience. Specifically compared to AppleMusic's Now Playing modal view. Not very good to describe. . It will only be obvious if you swipe on the phone yourself. I created a sample if you have a Promotion enabled device so you can test it: https://github.com/wxyjay/SwiftUIModal-master |
Yes, I agree - SwiftUI has a lower performance than UIKit. I don't know how SwiftUI sheet works exactly, however, since this modal sheet (same as fullScreenCover) is always presented on top, no matter where you attach it in the view hierarchy, I think it is a UIKit ViewController under the hood. It seems SwiftUI is still running inside a UIHostingController and the sheet is then presented modally above the UIHostingController. I'm closing this issue now. In case you have any suggestion for a code improvement of this package, let me know by opening a new issue or sending a pull request. |
Hi, thanks for your library.
I reported some issues with swipe gestures before, and it works fine now.
Right now I'm getting a project to work on an ipad and have run into a couple of tricky issues.
In the Mini state, use stage manage to adjust the zoom app, the miniView will be offset downward (so that it may not be visible). (appears in a floating state or when stage manage is enabled and not full screen)
In the expanded state and the App is not full screen, there will be some gaps at the top of the Expand View. (It is normal in regular split screen, open stage manage to appear)
In the full screen state, there will be a little gap at the bottom of the Mini View, just a little bit. (Any situation will occur, whether it is landscape or portrait)
My screen recording---->https://drive.google.com/file/d/1c0IzJTdrOnbllNE-osjXOidhzbzlEvyx/view?usp=sharing
Device: iPad Pro 2020 11-inch
OS: iPadOS 16.1
It's worth noting that everything works fine on my ipad Mini 5th generation (of course it doesn't support stage manage)
The text was updated successfully, but these errors were encountered: