我正在显示一个图像,其底部的 UIToolBar 上显示了三个按钮(喜欢、评论和不喜欢)。单击按钮时,会显示一个弹出窗口,列出评论或喜欢或不喜欢的数量。弹出窗口是一个 xib 文件,显示弹出窗口后,工具栏未放置并显示在 View Controller 的顶部。显示弹出窗口后,工具栏未放置 请帮助我解决这个问题。
最佳答案
我不完全确定问题是什么,请尝试编辑您的帖子并给予它一些爱:)
但对我来说,如果它是一个 UIViewController 尝试,听起来你并没有完全关闭弹出窗口:
self.dismiss(animated: true, completion: nil)
如果您将其添加为 subview ,请尝试:
yourViewController.willMove(toParentViewController: nil)
yourViewController.view.removeFromSuperview()
yourViewController.removeFromParentViewController()
关于ios - 工具栏位置从 View Controller 的底部更改为顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52753516/