Color changes correctly on Nav Bar

The code for tablerow selection is actually depreciated since
storyboards. the same code was copied to prepare for segue and to
access variables of the index selected use:

[self.tableview indexPathForSelectedRow]