Giter VIP home page Giter VIP logo

Comments (6)

OfTheWolf avatar OfTheWolf commented on May 29, 2024 1

@maxkillpo @iamarjun35

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.

OfTheWolf avatar OfTheWolf commented on May 29, 2024

Your question is not clear at all. Without code or detailed explanation of what you are experiencing I can not help you.

from twitterprofile.

maxkillpo avatar maxkillpo commented on May 29, 2024

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.

OfTheWolf avatar OfTheWolf commented on May 29, 2024

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.

maxkillpo avatar maxkillpo commented on May 29, 2024

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.

maxkillpo avatar maxkillpo commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.