Permalink

Hi Jay, thanks for your work.
I'm new to iOS and i'm trying to implement your sidebar, but i'm not sure how to do it. Maybe a more elaborated example on github would be great.

Anyway, the sidebar is working, but when i click on a sidebar button to go to another section of my app, it doesn't work as i expected.

My code is:

-(void)openMainWindow:(NSString *)windowID
{
DHSidebarViewController *rootController = //some long line to get the controller
UIStoryboard* mainStoryboard = //getting the storyboard
rootController.rootViewController = [mainStoryboard instantiateViewControllerWithIdentifier:windowID];
}

that only changes the rootView but does not close the sidebar. I tried with a [rootController closeSidebar] at the end but it get a really weird effect.

Can you help me?
Thanks in advance

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.