title: Not able to display tab bar icons in required order
body: <p>I wanted to display 6 icons on a tab bar in a specific order. For that in the storyboard I have dragged a tab-controller and added 6 viewcontrollers to it. I also added an image to each of the tab bars and also made different viewcontrollers for each of the tab bars. </p>
  
  <p>But the issue is the images/viewcontrollers aren't displaying as per the order specified in the storyboard.</p>
  
  <p>I have a .swift file also for the tabbarcontroller. It has some code for configuring the tab bars given like so...</p>
  
  <pre><code>class SampleTabBarController: UITabBarController, UIGestureRecognizerDelegate {
  
    // MARK: - Shared Instance
    static var shared: SampleTabBarController?
  
    // MARK: - Public Properties
    var homeTitle = "Home"
    var connectionsTitle = "Connections"
    var flightTitle = "Flights"
    var messagesTitle = "Messages"
    var companyProfileTitle = "Company Profile"
    var myCalendarTitle = "My Calendar"
  
    // MARK: - Private Properties
    fileprivate var homeNavigation = "HomeNavigation"
    fileprivate var home: HomeViewController? = nil
    fileprivate var homeIndex = 0
  
    fileprivate var connectionsNavigation = "ConnectionsNavigation"
    fileprivate var connections: ConnectionsViewController? = nil
    fileprivate var connectionsIndex = 1
  
    fileprivate var flightsNavigation = "FlightsNavigation"
    fileprivate var flights: FlightsViewController? = nil
    fileprivate var flightsIndex = 2
  
    fileprivate var messagesNavigation = "MessagesNavigation"
    fileprivate var messages: MessagesViewController? = nil
    fileprivate var messagesIndex = 3
  
    fileprivate var companyProfileNavigation = "CompanyProfileNavigation"
    fileprivate var compProfile: CompanyProfileViewController? = nil
    fileprivate var compProfileIndex = 4
  
    fileprivate var myCalendarNavigation = "MyCalendarNavigation"
    fileprivate var myCalendar: MyCalendarViewController? = nil
    fileprivate var myCalendarIndex = 5
  
    fileprivate var previousIndex = 0
  
    override func viewDidLoad() {
      super.viewDidLoad()
  
      SampleTabBarController.shared = self
  
      initialConfiguration()
  
    }
  }
  
  extension SampleTabBarController {
  
    private func initialConfiguration() {
  
      self.tabBarController(SampleTabBarController.shared!,
                            didEndCustomizing: SampleTabBarController.shared!.viewControllers!,
                            changed: true)
  
  
      configureViewControllers()
    }
  
    fileprivate func configureViewControllers() {
  
      // Home
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == homeNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let homeView = navigation.viewControllers[0] as? HomeViewController {
          self.home = homeView
        }
      }
      // Connections
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == connectionsNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let connectionView = navigation.viewControllers[0] as? ConnectionsViewController {
          self.connections = connectionView
        }
      }
      // Flight
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == flightsNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let flightView = navigation.viewControllers[0] as? FlightsViewController {
          self.flights = flightView
        }
      }
      // Messages
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == messagesNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let messagesView = navigation.viewControllers[0] as? MessagesViewController {
          self.messages = messagesView
        }
      }
      // Company Profile
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == companyProfileNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let companyProfileView = navigation.viewControllers[0] as? CompanyProfileViewController {
          self.compProfile = companyProfileView
        }
      }
      // My Calendar
      if let viewControllers = self.viewControllers {
        let navigationControllers = viewControllers.filter { $0.restorationIdentifier == myCalendarNavigation }
        if let navigation = navigationControllers.first as? UINavigationController ,
          let calendarView = navigation.viewControllers[0] as? MyCalendarViewController {
          self.myCalendar = calendarView
        }
      }
    }
  }
  
  // MARK: - UITabBarControllerDelegate
  extension SampleTabBarController: UITabBarControllerDelegate {
  
    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
      if previousIndex != tabBarController.selectedIndex {
        previousIndex = tabBarController.selectedIndex
        var elementText = ""
        var elementValue = ""
  
        switch previousIndex {
        case homeIndex:
          elementText = homeTitle
          elementValue = BottomBarItems.home.rawValue
        case connectionsIndex:
          elementText = connectionsTitle
          elementValue = BottomBarItems.connections.rawValue
        case flightsIndex:
          elementText = flightTitle
          elementValue = BottomBarItems.flight.rawValue
        case messagesIndex:
          elementText = messagesTitle
          elementValue = BottomBarItems.messages.rawValue
        case compProfileIndex:
          elementText = companyProfileTitle
          elementValue = BottomBarItems.companyProfile.rawValue
        case myCalendarIndex:
          elementText = myCalendarTitle
          elementValue = BottomBarItems.myCalendar.rawValue
        default:
          break
        }
      }
    }
  
    func tabBarController(_ tabBarController: UITabBarController, didEndCustomizing viewControllers: [UIViewController], changed: Bool) {
      for (index, viewcontroller) in viewControllers.enumerated() {
        // Home
        if viewcontroller.restorationIdentifier == homeNavigation {
          homeIndex = index
        }
        // Connections
        if viewcontroller.restorationIdentifier == connectionsNavigation {
          connectionsIndex = index
        }
        // Flight
        if viewcontroller.restorationIdentifier == flightsNavigation {
          flightsIndex = index
        }
        // Messages
        if viewcontroller.restorationIdentifier == messagesNavigation {
          messagesIndex = index
        }
        // Company Profile
        if viewcontroller.restorationIdentifier == companyProfileNavigation {
          compProfileIndex = index
        }
        // My Calendar
        if viewcontroller.restorationIdentifier == myCalendarNavigation {
          myCalendarIndex = index
        }
      }
    }
  
  }
  </code></pre>
  
  <p>But this doesn't seem to work...what is it that I'm doing wrong...?</p>