class CallHistoryDataSource : UITableViewSource
{
CallHistoryController controller;
public CallHistoryDataSource (CallHistoryController controller)
{
this.controller = controller;
}
public override int RowSelected(UITableView tableView, int section)
{
return controller.PhoneNumbers.Count;
}
//
// Returns a table cell for the row indicated by row property of the NSIndexPath
// This method is called multiple times to populate each row of the table.
// The method automatically uses cells that have scrolled off the screen or creates new ones as necessary.
//
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.DequeueReusableCell (CallHistoryController.callHistoryCellId);
int row = indexPath.Row;
cell.TextLabel.Text = controller.PhoneNumbers [row];
return cell;
}
}
`Helloworld_iOS.CallHistoryController.CallHistoryDataSource.RowSelected(UIKit.UITableView,int)'被标记为覆盖但没有找到合适的方法来覆盖(CS0115)
您好我正在尝试使用xamarin monotouch制作一个helloworld应用程序,我正在接受此错误。任何人都可以帮我解决这个问题吗?
谢谢
答案 0 :(得分:11)
我的猜测是您正在使用Unified API。
在哪种情况下使用此功能(nint
代替int
):
public override nint RowSelected(UITableView tableView, nint section)