I've created a class that inherits from UITableViewSource and another one from UITableViewCell. I'm not using an UITableViewController, because I am adding other views in an UIViewController. I was wondering if I could change the height of the rows because my height is kinda large because it has a "preview information" in it. But it is currently very small, and the solutions that I've found all include an UITableViewController because it has:
TableView.RowHeight = UITableView.AutomaticDimension;
TableView.EstimatedRowHeight = 40f;
Thank you for your time.
If you want to set the row height, then generally in the class that inherits from the UITableViewSource
, you will override the GetHeightForRow()
function similar to this:
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
{
return new nfloat(66);
}
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加