Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITableView Not working properly. #62

Open
vatsal1992 opened this issue Feb 27, 2018 · 4 comments
Open

UITableView Not working properly. #62

vatsal1992 opened this issue Feb 27, 2018 · 4 comments

Comments

@vatsal1992
Copy link

vatsal1992 commented Feb 27, 2018

Hey Harshil,

A Big Thanks for this Library

i've implemented this library and i'm trying to show list on the presented ViewController and for that i've implemented UITableView with all required delegates & datasources.

Issue
I found that there is a strange problem while i scroll the tableView. UITableViewCell doesn't reuses properly. while scrolling, it randomly hides UITableViewCell.

i've checked it twice that this is not the improper implementation of UITableView.

@felix-dumit
Copy link
Contributor

felix-dumit commented Feb 27, 2018

I'm having the same issue, here is a video illustrating the bug:

ezgif-3-2c12a33b59

It seems to happen when you scroll up rapidly and it bounces at the top.
It seems to be because of these lines: https://github.com/HarshilShah/DeckTransition/blob/master/Source/ScrollViewUpdater.swift#L85-L87
If I comment them the issue is gone.

Here is the code I used to reproduce the issue:

class TableViewController: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
    }
    
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 40
    }
    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
        cell.textLabel?.text = "IndexPath is \(indexPath)"
        return cell
    }
}

And change https://github.com/HarshilShah/DeckTransition/blob/master/Example/Source/ModalViewController.swift#L47 to let modal = TableViewController()

@HarshilShah
Copy link
Owner

Thank you for filing a bug and for the detailed reproduction. I'm gonna need to look into this a bit more, but the repro steps help a lot!

@TheAbstractDev
Copy link

Are you working on ?

@HarshilShah
Copy link
Owner

It’s on my list but I haven’t had much time unfortunately. Happy to look at others’ solutions if anyone has taken a shot. The fixit above to comment some lines breaks the bounce back behaviour so it can’t be used.

weiran added a commit to GlassUmbrella/DeckTransition that referenced this issue Jun 5, 2018
Minor regression being the scroll view still bounces at the top even though the parent view controller bounces.

Bug to track: HarshilShah#62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants