Comments (15)
Hi iulianvarzaru.
If you want to open same content view controller by selecting on each of cells, then you mast implement
tableView:didSelectRowAtIndexPath method and perform segue manually, e.g.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"yourSegue" sender:nil];
}
//...
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
UIViewController *vc = [[segue destinationViewController] viewControllers][0];
// pass some data
}
By doing this make sure that your left table view has segue with identifier @"yourSegue" of type AMSlideMenuContentSegue.
"I have tried playing with didselectitem and prepareforsegue but I get an error that there is no segue with rightMenu in storyboard."
If you use only left menu and haven't right menu and if you have setted 'All Exceptions' breakpoint, then its ok .
It's just stopped in the @Try @catch block.
You can just click on 'Continue program execution'
Or you can disable that breakpoint :)
from amslidemenu2.
Hey arturdev,
Thanks for the fast reply, I kinda got the same conclusion after trying different solutions. I have done it like this:
UINavigationController *nav = (UINavigationController *)[segue destinationViewController];
IPHomeCollectionViewController *hm = (IPHomeCollectionViewController *)[nav topViewController];
And then I am passing the data.
But, is this ok in terms of memory allocation ?
Thanks for you help and for creating this library.
Best Regards,
Iulian Varzaru
from amslidemenu2.
Yes, you are doing right :)
[nav topViewController];
or
[nav.viewControllers objectAtIndex:0];
from amslidemenu2.
Hi
When I do table:didSelect, Do I still need to implement segueIdentifierForIndexPathInLeftMenu?
I can't get it to work =(
I get the below error ( I am using storyboard and left menu only)
has no segue with identifier 'rightMenu'
And when I take out all the exception, I get the following
(<ERKLeftMenuViewController: 0x16648360>) has no segue with identifier '''
And yes, I do have 'leftMenu' segue =(
Any advice is appreciated
Thanks
Ben
from amslidemenu2.
You have to implement segueIdentifierForIndexPathInLeftMenu anyway.
and if you implemented
-tableView:didSelectRowAtIndexPath
method,
then you need to perform segue manually:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:[self.mainVC segueIdentifierForIndexPathInLeftMenu:indexPath] sender:self]; }
from amslidemenu2.
Hi
Thank you for quick response.
I am not sure what I did wrong but seems like 'prepareForSegue' happens THEN 'segueIdentifierForIndexPathInLeftMenu' happens.
The issue i have is the data I am passing doesn't seem to be saved.
And I found out that in prepareForSegue's destinationViewController one has different memory allcoated than the actual view controller that are presented at the end.
So it seems like 'segueIdentifierForIndexPathInLeftMenu overrides the manual perform segue from tableDidSelect ?
And also closing animation doesn't work for me and I think they are probably related issue.
Is there any advice you can share ?
Thank you so much in advance
Cheers
Ben
from amslidemenu2.
Can you provide part of your codes?
from amslidemenu2.
I certainly can. but which part would be relevant?
I have attached 2 screenshots.
One is from main and the other one is from Left menu view controller.
Thank you so much and let me know if there's any other part of codes you need.
Cheers
from amslidemenu2.
everything seems correct.
I think the problem is in another place.
It will be better if you send me your full project archive.
from amslidemenu2.
Thank you so much for your help.
I have set up github project for it
https://github.com/hsb1007/Kukky.git
I really appreciate your help! Thank you
from amslidemenu2.
Project can't be compiled.
It seems that project didn't merged successfully in git.
Make an archive of your project and send to
[email protected]
from amslidemenu2.
You have done some mistakes.
First of all, when you connect your menu to content view controller, make sure that segues source is the table view controller instead of UiTableviewCell.
Second, do not give same identifier to different segues (i.e. itemList).
And 3th mistake is in your ERKLeftMenuViewController's prepafeForSegue:sender method.
Here sender is view controller, not cell. And for getting selected indexPath just call
NSIndexPath *indexPath = [self.myTableView indexPathForSelectedRow]; if (!indexPath) // if this is true, than this means that the initial indexPath is opened { indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; } UINavigationController *contentNVC = [segue destinationViewController]; UIViewController *vc = [contentNVC topViewController]; //.. pass data to vc
from amslidemenu2.
Thank you so much!
They all working fine now =)
from amslidemenu2.
Welcome! :)
On Wed, Feb 26, 2014 at 6:43 AM, hsb1007 [email protected] wrote:
Thank you so much!
They all working fine now =)
Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-36085235
.
from amslidemenu2.
hello arturdev ,
I am trying to implement AMSlidemenu in iOS8 withStoryboard.i m new for storyboard already i m implement AMSlidemenu .
I have used two different left-menu one for before Login and Afterlogin how to manage thats I don't know.
beforLoginleftMenu So Slider-->>loginVC
If login button is pressed I would like to open new Slider Afterloginleftmenu.
Thank you So So much in Advance .
from amslidemenu2.
Related Issues (20)
- Using custom Menu Button HOT 3
- Navigation bar is not overlapping the status bar
- Black flickering of Menu when cell tapped HOT 1
- Warning: Null passed to a callee that requires a non-null argument HOT 1
- In Call Status Issue with AMSlideMenu
- Document codeless implementation
- Pass data between content view when calling openContentViewControllerForMenu HOT 4
- swipe to close menu
- openContentViewControllerForMenu – no animation
- Left menu table cannot be scroll up and down
- Demo is not same as shown in Gif image.
- [self mainSlideMenu] return nil after second load of mainviewcontroller
- Sending parameters between views
- ContentView isn't going to scale as displayed in gif
- Zombie stack for each menu press.
- Dangerous typo?
- Closing menu glitch
- How to setup with XIB instead of Storyboards Swift? HOT 1
- Disabled Panning is not staying disabled!
- Please add OneMore way to add LeftViewController and RightViewController HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amslidemenu2.