SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.32k stars 746 forks source link

When I use custom .xib I can't interact with the main viewController #469

Closed yunustek closed 3 years ago

yunustek commented 3 years ago

I want to show the SwiftMessages I created with Xib on the screen and interact with the main screen behind. How can I do that?

           let view = PushToastMessageView.instanceFromNib()

            let topVc = getTopViewController()
            let animator = LTTopBottomAnimation(style: .top)
            animator.hideDelay = 2
            config.presentationStyle = .custom(animator: animator)

            config.dimMode = .none
            config.interactiveHide = false
            config.duration = .forever
            config.interactiveHide = false
            config.presentationContext = .automatic
            config.preferredStatusBarStyle = topVc?.preferredStatusBarStyle
            config.keyboardTrackingView = KeyboardTrackingView()
            config.prefersStatusBarHidden = topVc?.prefersStatusBarHidden

            SwiftMessages.show(config: config, view: view)
yunustek commented 3 years ago

When I removed keyboardTrackingView it's worked!

wtmoose commented 3 years ago

Did you try disabling user interaction on the KeyboardTrackingView?

yunustek commented 3 years ago

Yes but didn't solve it

wtmoose commented 3 years ago

Sorry, I haven't had time to look at this until now. I'm not able to reproduce your issue. What I tried is, using the attached test project that uses the code you provided:

  1. Tap "Test"
  2. See message view appear with active text field
  3. Toggle switch on main view controller

According to your description, I should not be able to toggle the switch. If you can help me understand how to change my project to reproduce your issue, I can take another look.

SwiftMessagesTest.zip

wtmoose commented 3 years ago

No response...closing