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

Dynamic Menu get Content from Json #114

Open
cliffgr opened this issue Mar 7, 2014 · 5 comments
Open

Dynamic Menu get Content from Json #114

cliffgr opened this issue Mar 7, 2014 · 5 comments

Comments

@cliffgr
Copy link

cliffgr commented Mar 7, 2014

Any one Made it ? I want to download the menu on startup of app..

@stefanoa
Copy link
Owner

stefanoa commented Mar 7, 2014

You should be able to do it. However I never did it.

@cliffgr
Copy link
Author

cliffgr commented Mar 10, 2014

i got here an error

// This is the segue you want visibile when the controller is loaded the first time
-(NSIndexPath*) selectedIndexPath{
NSLog(@"selectedIndexPath");
return [NSIndexPath indexPathForRow:0 inSection:0];
}

out of index

@stefanoa
Copy link
Owner

you have to disable the loading of the initial content view controller because you are downloading it with the json.
To do that you have to remove the implementation of:

-(NSIndexPath*) selectedIndexPath; 

from your code

@cliffgr
Copy link
Author

cliffgr commented Mar 10, 2014

True but when i remove this method , the application force start with Menu

ios simulator screen shot mar 10 2014 9 56 45 am

ios simulator screen shot mar 10 2014 9 56 51 am

@cliffgr
Copy link
Author

cliffgr commented Mar 12, 2014

hello again i have problem with this......

UIStoryboard *storyboard=[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]];

UINavigationController *secondView= [storyboard instantiateViewControllerWithIdentifier:@"testa"];
MainMenu *myViewController = (MainMenu *)secondView.topViewController; 
myViewController.TableMenuSS=name; //Mutable array with menu titles
[self presentViewController:secondView animated:YES completion:^{
    SASlideMenuAppDelegate* app = (SASlideMenuAppDelegate*)[[UIApplication sharedApplication] delegate];

    [app.window setRootViewController:secondView];
}];

and the output is:

-[SASlideMenuRootViewController topViewController]: unrecognized selector sent to instance 0xa3762d0
2014-03-12 13:53:07.046 SASlideMenuDynamic[10566:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SASlideMenuRootViewController topViewController]: unrecognized selector sent to instance 0xa3762d0'

when i use secondView.presentedViewController; the data never pass to MainMenu

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