Open Arun30sep opened 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.
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
Even i got the same issue, any help please.
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.
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