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

cells disappearing and moving around on scroll #385

Closed
geoherna opened this issue Apr 18, 2016 · 14 comments
Closed

cells disappearing and moving around on scroll #385

geoherna opened this issue Apr 18, 2016 · 14 comments
Assignees
Labels

Comments

@geoherna
Copy link

Couldn't find an existing issue on here for what im experiencing, so if one exists and I missed it, I apologize in advance.

I'm dynamically creating the rows in my table using web data and everything works up and displays fine, but I'm having a weird issue where when I scroll through the tableview, some of the cells will disappear or move around. The issue usually happens when I scroll to the bottom and then scroll back up.

I'm kind of thinking this may be a reuse identifier issue or some sort but am not 100% sure. Any help or a point in the right direction would be appreciated, thank you.

Details:

Running Xcode 7.3 (swift 2.2)
running latest version of Eureka( installed using Carthage)

@geoherna
Copy link
Author

Here is a video of the issue happening:

https://youtu.be/zW-hoHhAeUU

@mtnbarreto
Copy link
Member

@geoherna Could you please make sure you have only one table view on your view controller. If you are using Storyboards please make sure the table view outlet is properly connected.

It would be great if you can upload this example project and post the form code here so we can look into it.

Regards

@mtnbarreto mtnbarreto self-assigned this Apr 18, 2016
@geoherna
Copy link
Author

geoherna commented Apr 19, 2016

@mtnbarreto OK, I will get some code to post here. FYI, im using Carthage to install Eureka, so I dont have a tableView in the ViewController? When I do try and add one I get "Cannot override strong property with weak property" since Eureka has an @IBOutlet public var tableView: UITableView? So im not sure if i'm suppose to add one using IB?

@diegomedina248
Copy link

@geoherna You can't have a property named tableView of type UITableView in your FormViewController subclass since FormViewController already provides one. In fact, that's the tableView you should use.
In the storyboard, any UIViewController whose custom class you set to FormViewController will have an outlet ready for you to set. So just drag an UITableView to that form and control-drag from your controller to the tableview.

@mtnbarreto
Copy link
Member

@geoherna You might have some issue related with #295.

If you do not add any tableView in the storyboards I expect that everything works out properly.

It seems to me that you added a tableView on your view controller using interface builder. Could you confirm that?

@geoherna
Copy link
Author

Yes, I have added a tableView using IB

@mtnbarreto
Copy link
Member

Could you connect it with tableview IBOutlet?

@geoherna
Copy link
Author

Yes, I added an outlet. I control dragged into the code and it gave me the error "Cannot override strong property with weak property".

@mtnbarreto
Copy link
Member

well, you should add @IBOutlet var tableView: UITableView? to your form view controller (the view controller that extends FormViewController, FormViewController also has a @IBOutlet public var tableView: UITableView?). This will not compile but it will let you connect the tableview outlet. After connecting the outlet delete the line you added before.

This is a workaround to connect the outlet since this is an Apple issue as explained in #295. This is the same as editing the storyboard xml by adding the outlet by code.

Let me know if this works...

@geoherna
Copy link
Author

Yea i was able to make that work. I am still getting the issue, but I am starting to think it has nothing to do with Eureka but the way that I am creating the sections. Could this issue happen is rows do not have unique tags?

@mtnbarreto
Copy link
Member

you must have unique tags within a form.

@geoherna
Copy link
Author

ahhh, then that would be the reason why. Thank you very much for the help!

@geoherna geoherna reopened this May 2, 2016
@geoherna geoherna closed this as completed May 2, 2016
@beseder42
Copy link

We also have this problem. Our rows and section have unique tags and we set a tableView as outlet from our XIB file. Any other suggestions?

@geoherna
Copy link
Author

@beseder42 another reason we were having this issue is because we were incorrectly calling readloadSection() over and over. Once we correctly only called that function when needed, the issues stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants