cemolcay / SlidingContainerViewController

An android scrollable tab bar style container view controller
MIT License
217 stars 41 forks source link

When Navigate to view controllers, navigation title changes to view controllers name #3

Closed mudithsilva closed 9 years ago

mudithsilva commented 9 years ago
override func viewDidAppear(animated: Bool) {
        super.viewDidAppear(animated)

    let viewController1 = self.storyboard?.instantiateViewControllerWithIdentifier("DescriptionViewController") as! DescriptionViewController
    let viewController2 = self.storyboard?.instantiateViewControllerWithIdentifier("ObligationViewController") as! ObligationViewController
    let viewController3 = self.storyboard?.instantiateViewControllerWithIdentifier("SkillsViewController") as! SkillsViewController
    viewController3.title = "SKILLS"
    let viewController4 = self.storyboard?.instantiateViewControllerWithIdentifier("QualificationViewController") as! QualificationViewController

    let slidingContainerViewController = SlidingContainerViewController (
        parent: self,
        contentViewControllers: [viewController1, viewController2, viewController3,viewController4],
        titles: ["Description", "Obligation", "Skills", "Qualifications"])

    view.addSubview(slidingContainerViewController.view)

  }

When shows viewscontrollers navigation bar title changes to titles: ["Description", "Obligation", "Skills", "Qualifications"]) but i want to change navigation bar title.