I'm trying to make a mixed app (objective c and swift using Bridging-Header), but only use objective c for the class SWRevealViewController (the left side menu). My other classes and the rest of my code is Swift.
I'm stuck in the actions for the menu button (revealViewController on the left side), for been more specific this is the piece of code in objective C:
_sidebarButton.target = self.revealViewController;
_sidebarButton.action = @selector(revealToggle:);
And now want use this on my Swift class, I have this:
_sidebarButton.target = self.revealViewController();
_sidebarButton.action = SWRevealViewController.revealToggle();
But I have an error in the 2 line:
_sidebarButton.action = SWRevealViewController.revealToggle();
Can any one helps me to convert this @selector(revealToggle:)
thing in its respective swift conversion.
Appreciated any help.
This is different to the other answers because the "revealToggle" method is not part of the same class. This is part of the SWRevealViewController class.