title: iOS Tab bar controller containing same Table views inside all tabs but different filtered data
body: <p>SOLVED: I think I figured it out on how to do it.</p>
  
  <p>I added tags to each of my view controllers for each tab. Then in the viewDidLoad method on the view controllers, I can add a switch based on which tab's tag is selected:
  <code>self.tabBarController.tabBar.selectedItem.tag</code></p>
  
  <p>Issue:</p>
  
  <p>I am pretty new to iOS development and need some feedback on this-
  Here is the scenario:</p>
  
  <p>I am using storyboards for this. We have a navigation controller inside a tab bar controller.
  The Tab bar controller contains the same types Table views inside all tabs but the data is filtered differently.</p>
  
  <p>For example Tab 1 will show all types of red fruits, tab 2 will show all kind of yellow fruits and so on. </p>
  
  <p>Now since I am using storyboards, do I need to create 2 different master view controllers branching from the tab bar controller for each tab? Or can I just use the same master view controller for both the tabs? </p>
  
  <p>Is there anything like an identifier on the segue which I can use specify which tab was selected? I couldn't find it on the segue from the tabbarcontroller to the navigation controllers.</p>
  
  <p>When a tab is selected, is there any method like "prepareforsegue" where I can preset the filter on the destinationviewcontroller? something similiar to what we have in a navigation based application? That way I won't have to create a different view controller for each tab.</p>
  
  <p>Thanks for the help!</p>