how to add uinavigation controller in a view based application

前端 未结 4 1150
甜味超标
甜味超标 2021-01-23 01:15

I wanted to add a navigation controller to a view based application . how can we do this both programmatically and using xib file..

4条回答
  •  迷失自我
    2021-01-23 02:06

    UINavigationController *navcontroller = [[UINavigationController alloc] initWithRootViewController:viewController];//here viewController is to which you want to make the navigation
    
    [self.view addSubView:navController.view];
    

提交回复
热议问题