我正在使用以下库来呈现视图控制器,就像本机iOS音乐应用程序一样:https://github.com/LeoNatan/LNPopupController
我似乎无法向下拖动模态控制器。我每次都要点击关闭按钮。我是从tabBarController中提出来的。
let popupContentController = storyboard?.instantiateViewController(withIdentifier: "ModalViewController") as! ModalViewController
popupContentController.popupItem.accessibilityHint = NSLocalizedString("Double Tap to Expand the Mini Player", comment: "")
self.popupContentView.popupCloseButton.accessibilityLabel = NSLocalizedString("Dismiss Now Playing Screen", comment: "")
self.popupBar.barStyle = .prominent
self.popupInteractionStyle = .drag
self.popupContentView.popupCloseButtonStyle = .round
self.popupContentView.popupInteractionGestureRecognizer?.isEnabled = true
self.presentPopupBar(withContentViewController: popupContentController, animated: true, completion: nil)
self.popupBar.tintColor = appColors.darkBlack
答案 0 :(得分:1)
这回答:https://github.com/LeoNatan/LNPopupController/issues/218
另一个库正在向弹出内容控制器的视图添加手势识别器,这会导致冲突。
通过实现交互式手势识别器委托并允许手势识别器之间同时工作,可以解决此类冲突。