Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample without Storyboard #52

Closed
tharak opened this issue Jul 20, 2016 · 8 comments
Closed

Sample without Storyboard #52

tharak opened this issue Jul 20, 2016 · 8 comments

Comments

@tharak
Copy link

tharak commented Jul 20, 2016

Hey, great work with this menu!
I have a project without storyboard, so I cant use segues. I did manage to make it work using pushViewController but the first time I click the cell on the menu the push fails, on the second time and afters it works just fine.
Maybe I set something wrong and after the first click your code fix it. Can you Make a sample without a storyboard?

Thanks

@jonkykong
Copy link
Owner

Hi @tharak, thanks for the compliment.

There's no requirement that this repo needs storyboards. You should try putting in breakpoints in several places to figure out what's being called on tap and what isn't to track down the problem first. If you want to share a link to your sample project, I'd be willing to take a look.

@tharak
Copy link
Author

tharak commented Jul 20, 2016

https://github.com/tharak/SideMenu
;)

@jonkykong
Copy link
Owner

Thanks for sharing.

It looks like you're doing something atypical that wasn't accounted for in the design of this library.

Namely, you're adding a UITableView directly to the view of a UINavigationController. UINavigationControllers are meant to host other viewControllers, not serve as a viewController themselves.

The preferred setup is to set the rootViewController of a UINavigationController to a UITableViewController.

@tharak
Copy link
Author

tharak commented Jul 20, 2016

Do you mind fixing my project as you think it should be?

@jonkykong
Copy link
Owner

Unfortunately, I don't have the time to develop for every possible corner case of this repo. Currently, it meets 90%+ of people's desired use cases.

Your problem is very solvable by following Apple's preferred and supported view hierarchy models. I suggest you do some quick rework of your project and you'll find your problem goes away.

@tharak
Copy link
Author

tharak commented Jul 20, 2016

I will try to do it, thanks for your help. =]

@tharak
Copy link
Author

tharak commented Jul 20, 2016

managed to make it work, problem was that when I looked at the third image https://github.com/jonkykong/SideMenu/raw/master/etc/Screenshot3.png the little arrow on the left gave the impression that that view controller was the window.rootViewController. This detail shows some errors that I went on fixing, resulting on the first code I shared with you.
Now I will move the code to my project, thanks for everything!

@jonkykong
Copy link
Owner

It is the window's root view controller.

The problem was that you physically inserted a UITableView inside of UISideMenuNavigationController. You shouldn't do that.

Instead, do UISideMenuNavigationController(rootViewController: someUITableViewController).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants