I created one File it's Swift
I add class Mypage: UITableViewController,
After in Storyboard I add one New UITableviewController and add Class
and in Editor Storyboard -> Embed in I add UInavigateController
now I use to going to this tableviewcontroller
let viewController:UITableViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Mypage") as! UITableViewController
self.present(viewController, animated: false, completion: nil)
when I go to Mypage I don't See navigator and I don't see the Rightbutton
override func viewDidLoad() {
super.viewDidLoad()
tableView.tableFooterView = UIView()
self.navigationItem.rightBarButtonItem = self.editButtonItem
}
I need to see right bar button
There are two ways:
Present "Mypage" with UINavigationController and Mypage as rootViewController
let viewController:UITableViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Mypage") as! UITableViewController
let navigationContoller = UINavigationController(rootViewController: viewController)
self.present(navigationContoller, animated: false, completion: nil)
Perform seque from button to the navigation controller on Storyboard.
(Use control-drag on Button)
]