Removing view from its superview

后端 未结 3 904
臣服心动
臣服心动 2021-01-25 12:09

I have added a few buttons to self.view. When the user clicks on one button, i will load another view (subView). My code where i am loading the subView is shown below

         


        
3条回答
  •  再見小時候
    2021-01-25 12:33

    Should this line:

    UIView *v = [self.subView viewWithTag:1];
    

    really be:

    UIView *v = [self.view viewWithTag:1];
    

    ?

提交回复
热议问题