0

When a phone call occurs, my app moves down, and the bottom of the app is cut off slightly. Is there anyway to shrink or resize that whole view when a call occurs.

Preferably through interface builder.

Vikings
  • 2,527
  • 32
  • 45

1 Answers1

2

Indeed, your application window does shrink its subview. For example, if you have a status bar so the frame of your root view is (0,20,320,460), then if the in-call status bar is on, then the frame becomes (0,40,320,440).

Then why does the bottom of your app seem to be cut off? It's simply because the root view autoresizes its content in that way. For example, its autoresizingMask property says it has a fixed top margin and a fixed content height. So,

  • If you want to 'squeeze' the view, try fixing both top and bottom margins and having flexible content heights.
  • If you want the in-call status bar to look as if it goes over your app, fix the content heights and the bottom margin, and have a flexible top margin.
  • If you have a fixed top margin and a fixed content height, then your app will seem to slide down.
MHC
  • 6,405
  • 2
  • 25
  • 26
  • I'm sorry but where are these features at? I only have one view, so were do I go to do this – Vikings Feb 19 '11 at 05:33
  • Select the superview, and in the Window Size pane of the inspector, there is 'Autoresizing' section which graphically represents the settings. Click on the edges representing top/bottom margins and the content height so only the top margin is deactivated. – MHC Feb 19 '11 at 05:42