MMDrawerController
MMDrawerController copied to clipboard
How to change centerviewcontroller based on the selection of sidemenu option?.
Hi there, maybe I can suggest you a way around to solve your needs.
- You can create a handler when clicking on the table view cell e.g:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.items[(indexPath as NSIndexPath).row] as! LBDMenuModel;
if (model.Id == "-1") {
dashboardService.showMaps();
} else if (model.Id == "-2") {
dashboardService.getFavorites();
} else {
if (model.Id != "") {
dashboardService.getDashboardPlaces(Int(model.Id));
}
}
closeDrawer();
}
- Then by using implementing that handler on your center view controller, you can navigate to your desired view controller e.g
class LBDDashboardViewController: UIViewController, ILBDDashboardView {
...
func showMaps() {
performSegue(withIdentifier: "dashboard_map_sid", sender: self);
}
}
From my perspective this is not a bug. Give it a go and let me know further