UITableView is a class in C# that provides a way to display and manage lists of data in a hierarchical form. It allows the user to scroll through a potentially large number of items, and can support editing, sorting, and searching.
Here are some code examples:
// Basic initialization of a UITableView UITableView myTableView = new UITableView(); myTableView.Frame = new CGRect(0, 0, View.Bounds.Width, View.Bounds.Height); myTableView.Source = new MyTableViewDataSource();
// Implementation of a custom UITableView's data source public class MyTableViewDataSource : UITableViewSource { public override nint RowsInSection(UITableView tableview, nint section) { // return the number of rows in the section return myDataList.Count; }
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath) { // return the height of the row return 60; }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { // create a new cell and return it UITableViewCell cell = new UITableViewCell();
cell.TextLabel.Text = myDataList[indexPath.Row];
return cell; } }
Here, we can see how a UITableView is initialized and some methods of its data source are implemented.
The package/library for UITableView is part of the iOS UIKit framework.
C# (CSharp) UITableView - 60 examples found. These are the top rated real world C# (CSharp) examples of UITableView extracted from open source projects. You can rate examples to help us improve the quality of examples.