Eureka: cells disappearing and moving around on scroll

Created on 18 Apr 2016  路  14Comments  路  Source: xmartlabs/Eureka

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)

carthage

All 14 comments

Here is a video of the issue happening:

https://youtu.be/zW-hoHhAeUU

@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 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?

@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.

@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?

Yes, I have added a tableView using IB

Could you connect it with tableview IBOutlet?

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

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...

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?

you must have unique tags within a form.

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

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?

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marbetschar picture marbetschar  路  18Comments

daveparks23 picture daveparks23  路  17Comments

johnlietzke picture johnlietzke  路  13Comments

chiliec picture chiliec  路  15Comments

lazymodifier picture lazymodifier  路  15Comments