如何在iPhone处于电话呼叫模式时手动/编程调整UIView的大小? [英] How to resize UIView manually/programmatically while iPhone is in phone call mode?

查看:184
本文介绍了如何在iPhone处于电话呼叫模式时手动/编程调整UIView的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的地图应用程序中,MapView控制器在电话呼叫模式下打开良好。当我在同一控制器中打开另一个UIView(子视图)的detailView时,它不会在电话呼叫模式下调整大小。我跟着
Iphone- How在切换呼叫状态栏时调整视图大小?
该链接还尝试自动调整我的UIView,但问题仍然存在。 我的detailView正在显示(向下)屏幕。有没有其他解决方案或我在代码中遗漏了什么? PLZ建议..

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..

编辑
其实我的firstView控制器包含mapview和tableview on segment按钮。并且在同一屏幕上以注释标注打开的详细视图为UIView。我的详细视图包含4个按钮,带有4个标签以及顶部和底部栏。底部栏的一半在电话呼叫模式中隐藏..

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


推荐答案

尝试使用

ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;

此外,对于特定的标签位置,您需要相应地检查和更新。

Also for specific label position you need to check and update accordingly.

这篇关于如何在iPhone处于电话呼叫模式时手动/编程调整UIView的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆