ios – 找不到合适的方法来覆盖RowsInSection xamarin

ios – 找不到合适的方法来覆盖RowsInSection xamarin,第1张

概述class CallHistoryDataSource : UITableViewSource { CallHistoryController controller; public CallHistoryDataSource (CallHistoryController controller) { this.cont
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)’ is marked as an overrIDe but no suitable method found to overrIDe (CS0115)

嗨,我正在尝试用xamarin monotouch制作一个helloworld应用程序,我正在接受这个错误.任何人都可以帮我解决这个问题吗?

谢谢

解决方法 我的猜测是你正在使用UnifIEd API.

在这种情况下使用this(nint而不是int):

public overrIDe nint RowSelected(UItableVIEw tableVIEw,nint section)
总结

以上是内存溢出为你收集整理的ios – 找不到合适的方法来覆盖RowsInSection xamarin全部内容,希望文章能够帮你解决ios – 找不到合适的方法来覆盖RowsInSection xamarin所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1008500.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-22
下一篇2022-05-22

发表评论

登录后才能评论

评论列表(0条)

    保存