So I am working on an app that has several tableviews that take you to a detailview and that detailview can either take you to a mapview or webview, here is an example of what I mean:
Instead of making several detail groups (detail,web,map), I just make all the tableviews, take you to the same detailView and put the information there because there are going to be a LOT of rows with information in it so that wouldn't be possible. Now it is not so much of an issue right now, but I think I am not doing things as I should. Basically I pass the information this way: In the "prepareforsegue" funcion, from the tableview to the detailview I use "if indexPath.row == 0", then just pass the information according to the row that was selected, I have an integer variable that is set to the number of the row that was clicked on the tableview and that too, is passed to the detailview so in the detailview I know what website to pass to the webview or location to the mapview, obviously as more spots are added to my tableview, I have to add more "ifs" and I am just not sure if this is the right approach or is there is a simpler way to do this.