Is it possible to define the height of a row in a UITableView without an UITableViewController?

memyselfandi

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.

Saamer

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]

編集
0

コメントを追加

0

関連記事

分類Dev

Pull to refresh UITableView without UITableViewController

分類Dev

How to increase the single row height without reloading UITableView or individual cells [Swift]?

分類Dev

Programmatically switch UITableView in UITableViewController

分類Dev

UIRefreshControl without UITableViewController

分類Dev

Is it possible to define a variable only once without using final

分類Dev

UITableView with dynamic height

分類Dev

Is it possible to commit a transaction and start a new one without releasing the row locks?

分類Dev

add navigation bar to UITableViewController without using NavigationController

分類Dev

UITableViewControllerをUITableViewに移行します

分類Dev

Collapse table-row's height in pure CSS (without affecting the table width)

分類Dev

What is the height of a row in Bootstrap?

分類Dev

wpf listbox row height

分類Dev

how to add a UItableview without storyboard? (UITableView error )

分類Dev

Scrollviewer not scrolling without height

分類Dev

Is it possible to have a UITableView under a UICollectionView?

分類Dev

UITableView indexPath.row issue

分類Dev

UITableView with variable cell height: Working in IB but not programmatically

分類Dev

Dynamic UITableView Cell Height Based on Contents

分類Dev

How to make fixed height cell on uitableview?

分類Dev

How to dynamically increase height of scrollview based on uitableview

分類Dev

is it possible to define an enum with int identifiers?

分類Dev

How to define width and height for an imageview for all screens?

分類Dev

Dynamic row height in a SwiftUI form

分類Dev

UITableViewControllerのUITableViewをプログラムで切り替えます

分類Dev

UITableViewControllerのUITableViewの前にUIViewを配置する

分類Dev

UITableViewを使用してUIViewControllerをUITableViewControllerに変換します

分類Dev

UITableViewController を ViewController の UITableView にプッシュする

分類Dev

Define instance Variables without property

分類Dev

Get div height without the scrollbar

Related 関連記事

  1. 1

    Pull to refresh UITableView without UITableViewController

  2. 2

    How to increase the single row height without reloading UITableView or individual cells [Swift]?

  3. 3

    Programmatically switch UITableView in UITableViewController

  4. 4

    UIRefreshControl without UITableViewController

  5. 5

    Is it possible to define a variable only once without using final

  6. 6

    UITableView with dynamic height

  7. 7

    Is it possible to commit a transaction and start a new one without releasing the row locks?

  8. 8

    add navigation bar to UITableViewController without using NavigationController

  9. 9

    UITableViewControllerをUITableViewに移行します

  10. 10

    Collapse table-row's height in pure CSS (without affecting the table width)

  11. 11

    What is the height of a row in Bootstrap?

  12. 12

    wpf listbox row height

  13. 13

    how to add a UItableview without storyboard? (UITableView error )

  14. 14

    Scrollviewer not scrolling without height

  15. 15

    Is it possible to have a UITableView under a UICollectionView?

  16. 16

    UITableView indexPath.row issue

  17. 17

    UITableView with variable cell height: Working in IB but not programmatically

  18. 18

    Dynamic UITableView Cell Height Based on Contents

  19. 19

    How to make fixed height cell on uitableview?

  20. 20

    How to dynamically increase height of scrollview based on uitableview

  21. 21

    is it possible to define an enum with int identifiers?

  22. 22

    How to define width and height for an imageview for all screens?

  23. 23

    Dynamic row height in a SwiftUI form

  24. 24

    UITableViewControllerのUITableViewをプログラムで切り替えます

  25. 25

    UITableViewControllerのUITableViewの前にUIViewを配置する

  26. 26

    UITableViewを使用してUIViewControllerをUITableViewControllerに変換します

  27. 27

    UITableViewController を ViewController の UITableView にプッシュする

  28. 28

    Define instance Variables without property

  29. 29

    Get div height without the scrollbar

ホットタグ

アーカイブ