How to change view on button click in iPhone without navigation controller?

后端 未结 5 1752
小蘑菇
小蘑菇 2021-01-03 11:54

I want to know how to change view on button click in iPhone without navigation controller?

5条回答
  •  时光取名叫无心
    2021-01-03 12:16

    You can place two UIView variables in the header file and hide/show one of them or you can make another layer over the existing view like this:

    -(IBAction)changeView {
    
        UIView *view = [[UIView alloc] initWithNibName:@"letMeSeeThis" bundle:nil];
        [self.view addSubview:view];
    }
    

提交回复
热议问题