Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

didSelectRowAtIndexPath Delegate / hide Slide Menu #15

Closed
rary44 opened this issue Jun 29, 2016 · 5 comments
Closed

didSelectRowAtIndexPath Delegate / hide Slide Menu #15

rary44 opened this issue Jun 29, 2016 · 5 comments

Comments

@rary44
Copy link

rary44 commented Jun 29, 2016

Hello

Is it possible to create the whole project programmatically (nib files without storyboard)?

i'm facing a problem with step 4 馃憤

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    sideMenuController?.embedCenterController(someUIViewControllerInstance)
}

When i select any cell [view controller] more than one time , it's shows the slide menu table quickly and it disappear , why is that ?

Regards

@rary44 rary44 changed the title didSelectRowAtIndexPath Delegate didSelectRowAtIndexPath Delegate / hide Slide Menu Jun 30, 2016
@teodorpatras
Copy link
Owner

Hi, can you upload an example project where you can reproduce this issue?

@rary44
Copy link
Author

rary44 commented Jun 30, 2016

SlideMenu.zip

Please Find it above

@teodorpatras
Copy link
Owner

this is an empty project.. i meant a project with some code that reproduces the issue...

@rary44
Copy link
Author

rary44 commented Jun 30, 2016

i upload it again please check it
i think the problem with the animation

@teodorpatras
Copy link
Owner

teodorpatras commented Jun 30, 2016

First of all, thank you for a project that does not compile. The problem is not with the animation, the problem is with how you "architected" the code. You have an array of view controllers from which you exchange the view controllers among each other. The problem is as follows:

when you select the same index, you make a transition to the same view controller that is visible on screen (which btw, should not happen, you should put a guard indexPath != previousIndex else { return }) and because you pass in the same view controller that is already embedded to the function embed(centerViewController: the animation gets lost because there is one single view which should be animated both off and on screen.

Conclusion:

Don't embed the same controller that is already on screen.

P.S: update to version 0.1.3

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

No branches or pull requests

2 participants