ios - How do I make multiple tableview cells to lead corresponding view controllers? -
ios - How do I make multiple tableview cells to lead corresponding view controllers? -
i making app tableviewcontroller initial view controller. has list of items in tableview cells. want each of tableview cell lead different view controller. here illustration of home screen: ![enter image description here][1]
what trying achieve, example, tools cell take me view controller details tools. , when click on weapons, should take me view controller details weapons. have view controllers set up, don't know how create segues each view controller. note: made these cells in code , not in storyboard. made array of items , used indexpath.row display them.
thanks help!
nstead of connecting , creating segue individual cells, can connect segues view controller button, lying below view in storyboard. in case, have multiple segues , none of them individually connected cells. , when segues ready, can utilize method moving on next view controller depending on cell tapped tableview.
[self performseguewithidentifier:@"yoursegue" sender:nil]; you have check cell tapped , perform appropriate segue on tap.
look out yellowish button shown below view screen in storyboard.
drag , drop segue button onto view controller want connect.
hope helps.
ios objective-c uitableview segue
Comments
Post a Comment