Resize for in-call status bar?

前端 未结 11 608
名媛妹妹
名媛妹妹 2020-11-29 03:06

How can I make my view resize in response to the in-call status bar from my nib?

I figured it would just be setting the resize properties, but they\'re not enabled f

11条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 03:35

    iOS will invoke your viewController's viewWillLayoutSubviews method whenever there is a change in status bar. You can override that and adjust your subviews according to the new bounds.

    - (void)viewWillLayoutSubviews {
        // Your adjustments accd to 
        // viewController.bounds
    
        [super viewWillLayoutSubviews];
    }
    

提交回复
热议问题