cemolcay / SlidingContainerViewController

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

multiple scrollviews are created , behind the view. #13

Open Arun30sep opened 7 years ago

Arun30sep commented 7 years ago

I'm using this library and come across a strange issue, as i was debugging my view hierarchy for some UIIsuues. There are multiple view created behind the desired sliding view. screen shot 2017-04-14 at 7 34 17 pm

here's my code that i used to build view

var categoryView = [CategoryViewController]() for i in 0..<self.titles.count{ let vc = self.storyboard?.instantiateViewController(withIdentifier: "CategoryViewController") as! CategoryViewController vc.delegate = self vc.data = self.data[self.titles[i]] as! Array<[String:Any]> categoryView.append(vc) } let slidingContainerViewController = SlidingContainerViewController ( parent: self, contentViewControllers: categoryView, titles: self.titles) self.slidingTabView.addSubview(slidingContainerViewController.view) slidingContainerViewController.sliderView.appearance.outerPadding = 0 slidingContainerViewController.sliderView.appearance.innerPadding = 30 slidingContainerViewController.sliderView.appearance.fixedWidth = false slidingContainerViewController.sliderView.appearance.selectorHeight = 1 slidingContainerViewController.sliderView.appearance.selectorColor = appColor slidingContainerViewController.sliderView.appearance.selectedTextColor = UIColor.black slidingContainerViewController.sliderView.appearance.textColor = UIColor.lightGray slidingContainerViewController.sliderView.appearance.backgroundColor = UIColor.white slidingContainerViewController.setCurrentViewControllerAtIndex(0) slidingContainerViewController.delegate = self

arshadsk5 commented 6 years ago

Even i got the same issue, any help please.