Comments (6)
reloadPagerTabStripView()
calls triggers viewControllers(for pagerTabStripController: PagerTabStripViewController)
so it creates view controller instances again. moving vc instance creations outside will fix the problem.
Change the code inside viewControllers(..) to below:
.
.
.
let vc = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BottomViewController") as! BottomViewController
let vc1 = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BottomViewController") as! BottomViewController
let vc2 = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BottomViewController") as! BottomViewController
let vc3 = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "BottomViewController") as! BottomViewController
// MARK: - PagerTabStripDataSource
override func viewControllers(for pagerTabStripController: PagerTabStripViewController) -> [UIViewController] {
vc.pageIndex = 0
vc.pageTitle = "Tweets"
vc.count = 10
let child_1 = vc
vc1.pageIndex = 1
vc1.pageTitle = "Tweets & replies"
vc1.count = 1
let child_2 = vc1
vc2.pageIndex = 2
vc2.pageTitle = "Media"
vc2.count = 10
let child_3 = vc2
vc3.pageIndex = 3
vc3.pageTitle = "Likes"
vc3.count = 2
let child_4 = vc3
return [child_1, child_2, child_3, child_4]
}
from twitterprofile.
Your question is not clear at all. Without code or detailed explanation of what you are experiencing I can not help you.
from twitterprofile.
I've added the refresh control below. It can't hold the footer.
How can I solve this problem?
I use pod PullToRefreshKit.
Self.tableView.configRefreshFooter
function
from twitterprofile.
You are probably adding it to your tableView inside bottomVC. Instead you should add it to the scrollView which you can get from func tp_scrollViewDidLoad(_ scrollView: UIScrollView)
func tp_scrollViewDidLoad(_ scrollView: UIScrollView) {
// use this scrollView to add refreshFooter.
scrollView.configRefreshFooter(container:self) { [weak self] in }
}
from twitterprofile.
Not work
When additional items were added, it caused the position to malfunction.
Regardless of whether I use the function inside or outside, there is still a problem with Offset
I added at tp_scrollViewDidLoad. Still have offset issues
I added that there is still a problem with offset
Or should I use other methods? Can you recommend me
from twitterprofile.
I know the problem It will happen when adding items to the tableview. This will cause the offset to malfunction
from twitterprofile.
Related Issues (20)
- Don't scroll when using reloadPagerTabStripView() HOT 3
- App hangs for a sometime after calling api and master scrollview messes up HOT 1
- Tap geustrue of UIView back button is not fired HOT 2
- It is an error to release a paused or stopped property animator. Property animators must either finish animating or be explicitly stopped and finished before they can be released.
- EffectView Stuck when change the tabbar HOT 2
- Odd scroll jumping when navigating from profile HOT 1
- No scrolling - When using a scrollview in Bottom controller in your sample project. HOT 1
- Bottom view Scrolls to Top when tableview reloads and row height changed HOT 8
- Allow customizing `panView` in view controllers
- Blur effect block the cover image view when the app enters from background (or lock and unlock screen) HOT 1
- scrollViewWillEndDragging HOT 1
- UICollectionView scrolls horizontally in header not working HOT 1
- how to handle refresh through bottomVC bounce
- RTL Support HOT 1
- The table view cell not get deselect after touch HOT 1
- Sticky View at bottom page
- How do you controll the navigation buttons.
- Cannot touch the overlayScrollView indicators HOT 1
- pod install HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitterprofile.