My app has a RootViewController with a UITableView. Each cell is populated with a song title, a user star rating view, and an avg user rating view. I’d like to create a second ViewController that sorts the order of songs by avg user rating by week, month, and all-time. It will function similar to Apple’s App store charts (the segmented control “Top Free”, “Top Paid”, “Top Grossing”).
The new ViewController will be basically identical to the RootViewController, with the added segmented control to change the datasource.
Do I need to duplicate the entire RootViewController class .h/.m, storyboard scene, and add a segmented control to the new class to do this? I’m guessing there’s a better way without duplicating all of the code from the RootViewController.
use some flag variables and hide the segmented control initially….
Just unhide the segment view on the appropriate event (i.e. when you want to switch to the second view)…
hope it helps… in order to get more precise hints, feel free to write your code here…