-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Section custom header with xib file+class #2237
Comments
A note: if I extend a UITableViewCell, the problem occur and scrolling seems to fix this, but if I extend a UIView the problem does not appear, so something is in the UITableViewCell class extension that interfere the first time the section is attach. |
So you mean this only appears when you subclass UITableViewCell? Are you doing that with your header view class (aka EKHeaderClass)? That should not subclass from UITableViewCell. Subclassing from UIView is correct |
|
Have you tried using UITableViewCell subclasses as headers of a UITableView without Eureka? I wouldn't be surprised if there is some added logic in UITableViewCell that is responsible for this. What I would do in such a case is design a UIView with common design and use that inside both a row and a header, instead of trying to use a cell as header, but maybe it works |
Yes, I did use subclassing the headers without having problems. At the moment I cannot put more time and money on this update to use a UIView custom class inside the headers, I wanted to re-use Eureka Custom Class (not the row) to be clever and have one class that does both things (header and regular row). But the point is that the this "glitch" occur only when the section is added, but when the header is off screen and then re enter the screen scrolling back the correct Y position, the cell is visible again; many people have this problem, is possible to track it someway? |
How is the behavior in this assignment (inside the onSetupView block): |
I created this ViewController, with the custom header subclassing UITableViewCell. I could not reproduced the issue.
Versions: Device: iPhone 14 Pro |
|
Ok, so is possible to use a custom tableviewcell instead of a view, good to know. |
Ok, I was testing it and I found out that if I delay the creation of the sections with the custom header form a nib, it does not works.
|
Describe the bug
I wish to re-use a custom class with a xib file in a section with some rows added dynamically,
but when I use the following code
I see that the xib view and its class gets instantiated but it disappear immediately;
if I keep adding more of the same to have a very long table/form and i start to scroll,
the headers reappear without problems.
On the contrary, if I use a simple view class, I have no problems and I see the header being attach
and never disappear.
Does anyone knows how to fix this?
Thanks 1k
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: