3

I am a neewbie to app development (and coding in general) but enjoying the journey :-)

(I am using Xcode 6.4) I have a table view controller with prototype cell embedded in a navigation controller..clicking on a row leads to the detail view controller. Everything working fine.

I'm interested in having up and down buttons on the 'Detail View Controller' to save someone from having to go back up and then down to the next detail again...so they just move between detailed views..

Any pointers... as I can't even drag a button to the nav bar on the detail view controller itself let alone start thinking about how to code the function :-)

Many thanks for your time!

PS can't post a pic of the storyboard as only just joined stackoverflow

Payges
  • 61
  • 4

2 Answers2

0

I am afraid you are gonna have to do that programmatically.

First, add multiple buttons on nav bar by following this. And hook up these buttons in your detail view controller.

Then, in each of your detail view controller, you need to have some property like previous item, next item. In prepare segue, pass these items from main view controller.

Finally, in the actions of the buttons, load previous/next item.

This is what I can think of based on your description, hope it helps.

Community
  • 1
  • 1
Automatic
  • 70
  • 1
  • 9
0

Have a next & a previous segue and in the master go to the next/previous row And push detail again.

Do it fast and use no animation and is seamless. We do it eithout story boarding but pop, push the detail vc in the same way.

Better is Chris's answer imho. This may just be less effort ;)

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135