How to resize UIView manually/programmatically while iPhone is in phone call mode?

倖福魔咒の 提交于 2019-12-11 05:07:56

问题


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

回答1:


Try using

ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;

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



来源:https://stackoverflow.com/questions/8790208/how-to-resize-uiview-manually-programmatically-while-iphone-is-in-phone-call-mod

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!