SWRevealViewController open tableview when cell selected - Swift -


i using swrevealviewcontroller, have 3 cells "first" "second" "last". , have 3 different tableviews, "firsttableviewcontroller", "secondtableviewcontroller", "lasttableviewcontroller".

i tried use didselectrowatindexpath, prepareforsegue. couldn't implement multipe segues in didselectrowatindexpath.

is there way this?

import uikit  class sidebartableviewcontroller: uitableviewcontroller {      var menuarray = [string]()      override func viewdidload() {         super.viewdidload()         menuarray = ["first","second","last"]         var view = uiview(frame: cgrectzero)         self.tableview.tablefooterview = view         self.tableview.backgroundcolor = uicolor.whitecolor()     }     override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int {         return menuarray.count     }     override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {         var cell = tableview.dequeuereusablecellwithidentifier(menuarray[indexpath.row], forindexpath: indexpath) uitableviewcell         cell.textlabel?.text = menuarray[indexpath.row]         return cell     }  } 

cell identifiers : first, second, last

thanks,

ok, found solution. followed tutorial, there no need set segue in code, kntrl+drag view controllers , select "swrevealviewcontrollerseguepushcontroller" ...

http://www.appcoda.com/sidebar-menu-swift/


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -