mamaral / Neon

A powerful Swift programmatic UI layout framework.
MIT License
4.58k stars 389 forks source link

How to autoheight UITableViewCell? #38

Closed Orangerc closed 8 years ago

Orangerc commented 8 years ago

When i use Neon,I can't use this gramera to autoHeight UITableViewCell self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight = 300

Could you fix the problem? Thank you.

mamaral commented 8 years ago

Unfortunately, Neon isn't built to handle that type of thing, it's a totally different mechanism.

Orangerc commented 8 years ago

This means,I can not use Neon in UITableViewCell? Thank You.

mamaral commented 8 years ago

You can use neon to layout the views inside a cell, but you need to calculate the height of the cell yourself.

Orangerc commented 8 years ago

Thank You,I know.

florianchrometz commented 8 years ago

@Orangerc @mamaral is the a sample codesnippet for creating TableViewCells with Neon? I am really struggeling with doing that :-/

mamaral commented 8 years ago

What are you struggling with exactly?

florianchrometz commented 8 years ago

I do set the height of the TV in the delegate methods in the viewcontroller. The cell does match the height but I really dont know how to perform something like the "layoutFrames()" function within the tableviewcell .. this is why I am looking for a sample codesnippet for a tableviewcell created with neon :-)

mamaral commented 8 years ago

Set frames in layoutSubviews

florianchrometz commented 8 years ago

Works perfect, thank you very much!

mamaral commented 8 years ago

Glad to help!