Showing Menu Controller
Twitter Slide Out Menu
Continuing on from the last lesson, we'll add some additional behavior to our navigation button in today's video. This button will show the main menu once we press on it. First, we'll need to create this menu screen by subclassing a simple UITableViewController and override the necessary methods of numberOfRows:section and cellForRow:indexPath. Once we have this controller stubbed out, let's show it inside the main portion of our UI.

Comments (5)
daniel123
4 years ago
I really like how you explained how to navigate Apple's documentation. It is so commonly assumed knowledge.
Tube
4 years ago
To your list of places to learn about Swift, I would add the iOS Developers workgroup in Slack. 25K members. Very international. #help available. Use the app or Web site.
Tube
4 years ago
I had to add the frame, otherwise it did not cover the first row of the table. let vc = ViewController() vc.view.frame = view.frame vc.view.backgroundColor = .yellow view.addSubview(vc.view)
stevejobs
3 years ago
Thank You
lisa liu
4 years ago
if HomeController is not the root controller, for example it's the 2nd view controller of the navigation controller. The "Open" button sits at UINavigationItem.rightBarButtonItem, and the button could be used as open and hide menu function. After hiding the menu controller and clicking the back button to return to the first view controller, the menu controller will still display.When re-enter to the home controller, it could also show when segue from the first controller. As menu controller still sits at -300 position. If we try to remove menuController when hide and add it when open, it seems the animation is not smoothly when hiding. How to solve the problem? Thanks.
lisa liu
4 years ago
Ah, I know the answer. Remove menu controller in the completion part of the animation.
romer_96p@hotmail.com
3 years ago
KeyWindow has been depreciated for iOS 13.. what to use instead
Brian Voong
3 years ago
romer_96p@hotmail.com
3 years ago
nv just found a solution in stackoverflow
romer_96p@hotmail.com
3 years ago
Ahh just noticed your reply.. thx man.., yea I did that thanks
HELP & SUPPORT