Hi!
I am lost many time for search how to create custom cells with property UITableViewAutomaticDimension for TableViewCells in Java…
Please, help!)
Thank you!
It is a tableView property. See apple docs at https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithSelf-SizingTableViewCells.html#//apple_ref/doc/uid/TP40010853-CH25-SW1
hm, my question: how I can make it from Multi-OS-Engine (on Java).
I know how it works in objective-c/swift.
What is the issue? You just call iOS API from Java. The API is still the same.
For example,
@Override
@Selector(“tableView:cellForRowAtIndexPath:”)
public UITableViewCell tableViewCellForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath) {
HashMap<String, String> row = this.data.get((int) indexPath.row());
String cell_template = “template_1”;
CustomCell cell = (CustomCell)tableView.dequeueReusableCellWithIdentifierForIndexPath(cell_template, indexPath);
if(cell_template == “template_1”){
// tableView.setEstimatedRowHeight(90);
// tableView.setRowHeight(UITableViewAutomaticDimension); <---- How do this
}
return cell;
}
UIKit.UITableViewAutomaticDimension()
PS: I don’t think that is how auto-dimension supposed to work, e.g. check this code https://github.com/gklka/automatictableviewcellheight/blob/master/Proba/GKTableViewController.m