当 iPhone 处于通话模式时,如何手动/以编程方式调整 UIView 的大小?
在我的地图应用程序中,MapView 控制器在电话呼叫模式下打开得很好。当我打开同一控制器中的另一个 UIView(子视图)detailView 时,它不会在电话呼叫模式下调整大小。我已关注 Iphone-如何在通话状态栏时调整视图大小已切换? 该链接还尝试自动调整我的 UIView 大小,但问题仍然存在。 我的详细信息视图即将离开屏幕(向下)。还有其他解决方案或者我在代码中遗漏了一些东西吗?请建议..
编辑 实际上我的第一个视图控制器包含分段按钮上的地图视图和表格视图。详细视图在同一屏幕上作为 UIView 在注释标注上打开。我的详细视图包含 4 个带有 4 个标签的按钮以及顶部和底部栏。底部栏的一半在通话模式下隐藏。
//BusinessCard(detailview) content
ShowroomName.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //label
Address_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //label
p_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
e_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
w_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
aButton.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin; //button on bottom bar
In my map application the MapView controller is opens well in phone call mode. When I open detailView which is another UIView(subview) in same controller it does not get resize in phone call mode. I have followed
Iphone- How to resize view when call status bar is toggled?
the link also try to autosize my UIView but still the problem exist. My detailView is going out(down) of screen. Is there any other solution or I am missing something in code?? plz suggest..
Edit
Actually my firstView controller contains mapview and tableview on segment button. And detailview which opens on annotation callout as UIView on same screen. My detailview contain 4 buttons with 4 labels and top and bottom bar. The the half of bottom bar get hide in phone call mode..
//BusinessCard(detailview) content
ShowroomName.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //label
Address_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //label
p_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
e_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
w_Bcard.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
aButton.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; //button
ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin; //button on bottom bar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
Also 对于您需要相应检查和更新的特定标签位置。
Try using
Also for specific label position you need to check and update accordingly.