我正在使用 tableView
来显示联系电话和一些相关信息,点击 tableviewCell
可以让我的用户从应用中调用相关人员。
使用以下代码调用电话:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel: 9999999999"]];
问题:
Getting an extra space from top when user ends call and automatically backed the to app, see screenshots below.
通话前:
在系统支持到应用的调用之后:
我该如何解决请提出建议。谢谢。
最佳答案
在您的 View Controller 中,实现 UIBarPositioningDelegate
并在其中添加以下方法。
func positionForBar(bar: UIBarPositioning) -> UIBarPosition {
return .TopAttached
}
或者,在 ViewWillAppear 上添加这个
var frame: CGRect = (self.navigationController?.view.frame)!
frame.origin.y = 0
self.navigationController?.view.frame = frame
关于ios - 从应用程序调用后顶部的额外空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43040678/