Segmented control in Silver challenge?

Hi all -

I am hoping that one of you can help me… I am about to pull my hair out… :frowning:

For the Silver Challenge, I am trying to implement a segmented control to switch between interesting and recent photos. I have the control on the storyboard, I hooked it up to the PhotosViewController, and I am able to download and parse the JSON payload into photos for each case. The only thing that I cannot figure out is how to implement the segmented controller. What should my cases be for each segment (i.e., what do I want them to do)? I am trying to figure out a way to hook into viewDidLoad(), but I cannot figure out how to do it. I feel like I thinking about this problem the wrong way.

Any thoughts would be appreciated.


“to switch between interesting photos and recent photos.”

Excerpt From: Keur,Christian. “iOS Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides).” iBooks.