开发者

iPhone App Phone Call Situation

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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜