yannickl / FlowingMenu

Interactive view transition to display menus with flowing and bouncing effects in Swift
MIT License
974 stars 111 forks source link

How could i retrieve didselect item on tableview? #8

Closed themythIOS closed 7 years ago

themythIOS commented 8 years ago

On the menu viewcontroller.. i tried to add my custom delegate, no luck retrieving and return data to another viewcontroller.

themythIOS commented 8 years ago

i tried to disable the dismiss to monitor the menu view controll. It has a very much delay on did select of a tableview cell. Or i miss something?

yannickl commented 8 years ago

I'm sorry I don't understand your problem. What is your problem exactly, what do you need? Have you also some sample code?

elcura commented 8 years ago

Hi, yannickl

I have the same problem, the issue is when you show the MENU View controller with a TableView inside, when you try to know what Row did you selected, the recognizer gesture of flowingmenu takes the control, and this method:

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { print ("row MenuViewcontroller: (indexPath.row)")

}

Never triggers the row i selected before the Menu View controller close.

The example itself you provide, you can test it, When Menu appears it shows a TableView with names, but you cannot access what name did you Tap.

Sorry for my english.

Rafa.

elcura commented 8 years ago

Hi Again, I Solved the problem. In the FlowingMenuTransitionManager+UIGestureRecognizer.swift I add this line: tapGesture.cancelsTouchesInView = false

On func: addTapGesture(view: UIView) Example: func addTapGesture(view: UIView) { let tapGesture = UITapGestureRecognizer() tapGesture.cancelsTouchesInView = false tapGesture.numberOfTapsRequired = 1 tapGesture.addTarget(self, action: #selector(FlowingMenuTransitionManager.tapToDismissAction(_:))) view.addGestureRecognizer(tapGesture) }

Now, i can tap the Row, know what element i selected and dismiss the Menu

Rafa.

khushbooPS commented 8 years ago

Hi Yannick, I have same issue, I did not call didSelectRowAtIndexPath delegate. I used:

tapGesture.cancelsTouchesInView= false

But I did not get success. What i do? Please help me sir.

Khushi.

yannickl commented 7 years ago

It should be fixed now!