Tuesday 15 February 2011

iphone - push from a side bar menu to another view controller in ios -


In my application, I use Sidebar menus in Facebook, so I have different cells in this menu , What I want when a click on a cell pushes me to another view controller. I have to face a problem here which is: The menu is a table view that I do not have in the storyboard, I use some classes from

and I have stacked here, in my application I have a storyboard, but it is programmed with menu code, and there is no view in the strokeboard,

didSelectRowAtIndexPath method: I use this way

  Int j = 0; j and lt; 9; j ++) {if (indexPath.row == j) {viv Nsaidbar Drishykantrolr * Nibnddrishy = [[Vivrnsaidbar view controller alloc] init]; Essay View.detailItem = [jsonResults objectAtIndex: j]; NSLog (@ "% @ =% d", essayView.detailItem, J); }}   

And when I push from the menu item, then I am creating a detail viewer controller as the new view controller. In this class, I have to configure a view Make the method, and only I resonate the result:

  - (zero) configureView {// Update user interface for expansion item if (self.detailItem) {NSLog (@ "% @ ", Self.detailItem); }}   

The result is true as I want, but I want to push another view controller, nothing really happened when I click on the menu on an item.

How do I create a new view controller in the storyboard? If there is no storyboard in the menu, how can I connect them to segues?

In fact, I am blue with it, please help!

You should make an example of app delegate class in the side menu view controller, and press it from there. You should have a reference to the side menu view and context of the center view! Import your App Rep in the Side Menu Controller, and use the didSelectRowAtIndexPath, in:

  DetailsSidebar ViewerTranslator * essayView = [[Details Sidebar View Controller alloc] init]; Essay View.detailItem = [jsonResults objectAtIndex: indexPath.row]; // Note that you do not need to know about the loop why you need an object * myAppDelegate = (AppDelegate *) [[UIApplication sharedApplication] delegate]; [MyAppDelegate.sideMenuViewController TogglesSide Menu]; // Here's the idea that you have to close the side menu, ie this [myAppDelegate.centerViewController.navigationController pushViewController: Animated Animation Essay: Yes];   

This is all the code you need, if I use, as a piece of advice, use the library instead, in my opinion, it is more simple and more simple implementation, Just look at the README file, everything has been explained very simple, and it is absolutely necessary code for you! Hope this will help, good luck!

No comments:

Post a Comment