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

UITableViewCell subclass using an xml layout #179

Open
algrid opened this issue Jul 11, 2019 · 0 comments
Open

UITableViewCell subclass using an xml layout #179

algrid opened this issue Jul 11, 2019 · 0 comments

Comments

@algrid
Copy link

algrid commented Jul 11, 2019

Is there a way to achieve that?

When I'm trying something like this:

class MyTableViewCell: UITableViewCell, LayoutLoading {

I'm getting the following error: Type 'MyTableViewCell' does not conform to protocol 'LayoutLoading'.

My original problem is that I want to use a library like Kingfisher or SDWebImage to load an image inside my cell. layoutNode.setState doesn't allow that, so it looks like I need an outlet, but I don't know how to create an outlet for a view in a Layout-based UITableViewCell.

I can create a custom view for my cell contents and then manually put it into a UITableViewCell subclass, but is there a better way to do it?

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

1 participant