UIViewController In-Call Status Bar Issue

前端 未结 8 970
误落风尘
误落风尘 2020-12-01 12:24

Issue:

Modally presented view controller does not move back up after in-call status bar disappears, leaving 20px empty/transparent space at the top.<

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 13:04

    I solve this issue by using one line of code

    In Objective C

    tabBar.autoresizingMask = (UIViewAutoResizingFlexibleWidth | UIViewAutoResizingFlexibleTopMargin);
    

    In Swift

    self.tabBarController?.tabBar.autoresizingMask = 
      UIViewAutoresizing(rawValue: UIViewAutoresizing.RawValue(UInt8(UIViewAutoresizing.flexibleWidth.rawValue) | UInt8(UIViewAutoresizing.flexibleTopMargin.rawValue)))`
    

    You just need to make autoresizingMask of tabBar flexible from top.

提交回复
热议问题