How to add a UIView above the current UITableViewController

后端 未结 20 855
旧时难觅i
旧时难觅i 2020-11-27 11:57

I have difficulty adding a subview (UIView) from within the viewDidLoad method of a UITableViewController

This works:

[self.view addSubview:self.prog         


        
20条回答
  •  情书的邮戳
    2020-11-27 12:41

    You can increase the zPosition of the layer of your view.

    This will make it display above the other views (which have a zPosition equal to 0, by default)

    self.progView.layer.zPosition++;
    [self.view addSubview:self.progView];
    

提交回复
热议问题