ios - 无法在表单样式控制器上显示控制器
问题描述
我正在研究自定义演示样式并遇到一个问题。我使用的是https://github.com/ergunemr/BottomPopup库,但无法在可见上下文中呈现!
BottomPopupPresentAnimator
我已经在课堂上更改了以下方法中的代码
func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
let toVC = transitionContext.viewController(forKey: .to)! // sub
let fromVC = transitionContext.viewController(forKey: .from)! // plan
transitionContext.containerView.addSubview(toVC.view)
let presentFrame = transitionContext.finalFrame(for: fromVC)
let initialFrame = CGRect(origin: CGPoint(x: 0, y: fromVC.view.frame.height), size: presentFrame.size)
toVC.view.frame = initialFrame
UIView.animate(withDuration: transitionDuration(using: transitionContext), animations: {
toVC.view.frame = presentFrame
}) { (_) in
transitionContext.completeTransition(true)
}
}
我实现的是
我已经尝试过不同类型的演示风格组合
谁能建议这里有什么问题?我只想展示中间控制器(弹出设置)
解决方案
推荐阅读
- c# - 在 64 位机器上注册 32 位 dll
- javascript - 我如何知道 for 在 javascript 的字典中打印的对象是什么?
- java - java文件写入仅在Windows中创建空文件
- python - 如何枚举熊猫组内的组
- angular - 命名路由器插座不工作
- master-data-services - MDS 导入数据队列
- java - 子项目如何将根项目作为gradle中的依赖项?
- vba - 弹出窗口将显示在不需要的收件人的 Outlook 中
- javascript - 当 html 中的画布尺寸高于 900 像素时,下载属性不起作用
- php - 使用具有多个查询的函数将 mysql 转换为 mysqli 的问题