title: how to embed navigation controller in a view programmatically?
body: <p>I have a view controller which is my HomeViewController, and I have a modal segue between them.</p>
  
  <p>This is the HomeViewController:</p>
  
  <pre><code>import "HomePageViewController.h"
  #import "CreatePageViewController.h"
  #import "StackTableViewController.h"
  #import "PopUpView.h"
  
  
  @interface HomePageViewController ()
  
  @property (nonatomic, strong) IBOutlet UIButton *toggleButton;
  @property (nonatomic, strong) CreatePageViewController *modalTest;
  @property (nonatomic, strong) PopUpView *popup;
  
  @end
  
  @implementation HomePageViewController
  
  -(UIStatusBarStyle)preferredStatusBarStyle{
      return UIStatusBarStyleLightContent;
  }
  
  -(void)viewDidLoad {
      [super viewDidLoad];
  
      UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:Nil];
      _modalTest = [storyboard instantiateViewControllerWithIdentifier:@"ModalTest"];
  
      [_toggleButton addTarget:self action:@selector(go) forControlEvents:UIControlEventTouchUpInside];
  
      [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(hide) name:@"HideAFPopup" object:nil];
  }
  
  -(void)go {
  
      _popup = [PopUpView popupWithView:_modalTest.view];
      [_popup show];
  }
  
  -(void)hide {
  
      [_popup hide];
  }
  - (IBAction)pushToNextViewController:(id)sender {
  
      StackTableViewController *vc = [[StackTableViewController alloc]init];
      [self presentModalViewController:vc animated:YES];
  }
  
  
  -(void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
  }
  
  @end
  </code></pre>
  
  <p>I want to add a navigation controller to StackTableViewController...its just a table view and I want it to have a navigation controller, how should I do this?</p>
  
  <p>Also, why xcode tells me my modal method presentModalViewController is deprecated?</p>
  
  <p>tnx</p>