How to make a UIView that can cover the navigation bar?

后端 未结 4 2005
再見小時候
再見小時候 2021-02-19 07:47

I want to show the UIView in full screen, but show the status bar, other things, like the navigation bar need to cover by the UIView.

4条回答
  •  难免孤独
    2021-02-19 08:09

    I believe what he was asking was how to make a UIView cover the entire screen (sort of like custom pop up). This is precisely how I ended up here. So I will offer my solution. Call this function anywhere.

    [self.navigationController.view addSubview:yourUIView];
    

    Here the view you introduced cover over the whole screen unlike

    [self.view addSubview:yourUIView]; 
    

    Whereby, the navigation bar is uncovered.

提交回复
热议问题