1

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
Community
  • 1
  • 1
Navnath Memane
  • 265
  • 1
  • 8
  • 25
  • 1
    Have you used uiviewautoresizingflexibletopmargin property to resize the view? – rishi Jan 09 '12 at 16:38
  • I try to used uiviewautoresizingflexibletopmargin but its expanding my UIview after phone call ended instead of shrinking – Navnath Memane Jan 10 '12 at 06:44
  • Can you show some screen shot, also try using correct autoresizing mask as per your needs, that will certainly fix your problem. – rishi Jan 10 '12 at 08:11
  • can you correct my updated code – Navnath Memane Jan 10 '12 at 11:41
  • 1
    Try using ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; – rishi Jan 10 '12 at 15:46
  • Hello RIP......your solution only work in .ipa file of my project not directly in debugging in code. But if I tested by deleting and again syncing the app..the app start misbehaving with autoresize???? Only sometimes it get resize:(:( – Navnath Memane Jan 13 '12 at 06:55
  • Means this is not working with simulator? – rishi Jan 13 '12 at 07:09
  • I am checkin on device and calling on another phone.....so sometimes detailview get resize and some time it is expand(bottom bar get out of view) and remain expanded position after disconnecting phone call. I have phone numbers on detailView so user can directly call through pressing phone call button. Thats y it get important for me to remove this bugg:( – Navnath Memane Jan 13 '12 at 07:17
  • I am trying above autoresizingMask code in tableview selection & on annotation callout button. Is it right? – Navnath Memane Jan 13 '12 at 07:40
  • Yep finally successful with your suggestion.....tried correct autoresize property for particular labels. Thanks RIP – Navnath Memane Jan 20 '12 at 10:07
  • Great..So i am posting this as a answer, you can accept that and close this question. – rishi Jan 20 '12 at 14:37

1 Answers1

6

Try using

ViewOnMapButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;

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

rishi
  • 11,779
  • 4
  • 40
  • 59