Closed codobuxsocial closed 4 years ago
@codobuxsocial Thanks for nice words.
%path to example%/ViewController.swift
func headerViewController() -> UIViewController {
headerVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "HeaderViewController") as? HeaderViewController
return headerVC!
}
func bottomViewController() -> UIViewController & PagerAwareProtocol {
pagerVC = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "XLPagerTabStripExampleViewController") as! XLPagerTabStripExampleViewController
return pagerVC
}
headerVC.passData(...) // you can call anywhere in the code
pagerVC.passData(...) // you can call anywhere in the code
See below TPProgressDelegate method. You can use progress to implement blur effect on scroll.
//MARK: TPProgressDelegate
func tp_scrollView(_ scrollView: UIScrollView, didUpdate progress: CGFloat) {
headerVC?.adjustBannerView(with: progress, headerHeight: headerHeight())
}
Thanks for the quick response, will play around with it!
Thanks alot first of all, this library has been really helpful and should have much more attention since it pretty awesome.
My question now is I am calling API in main controller where we have given TPDataSource, after fetching data from API i want to forward it to header and bottom controllers. Can you tell me how we can achieve that?
Also is there a way to blur the image when content is scrolled up top and show user name over it?