我在一个viewController中添加另一个viewController(一个聊天界面)的view及其childViewController。问题是:在聊天界面的navigationbar之间出现了一片空白,我不知道是怎么发生的。当我设置“navigationController?.navigationBar.translucent = True”时就变成了这样的效果(参见gif Action 图)
最佳答案
我已经解决了这个问题
let chat = ChatViewController(conversationType: RCConversationType.ConversationType_PRIVATE, targetId: currentId)
currentVC = chat
self.addChildViewController(chat)
self.view.addSubview(chat.view)
chat.didMoveToParentViewController(self)
chat.view.frame.origin.y = -64
关于ios - 出现在空白 UINavigationBar 的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37625685/