亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

UITableViewCell 未正確呈現

UITableViewCell 未正確呈現

C#
30秒到達戰場 2022-12-24 14:41:41
我們創建了一個 TableViewController 以便用戶可以啟用/禁用不同的通知類型。初始加載后,一切都很好,直到用戶滾動到底部然后回到頂部并且前 1-2 個表格視圖單元格未正確顯示。示例: https ://imgur.com/7n2VpTo通常刪除并重新創建視圖控制器和 xib/cs 文件可以修復此問題,但想知道是否有人知道此問題的原因。控制器代碼:    public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)        {             return 305;        }        public override nint NumberOfSections(UITableView tableView)        {            return 1;        }        public override nint RowsInSection(UITableView tableView, nint section)        {            return _numRows;        }        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)        {            var cell = tableView.DequeueReusableCell(Setting.Key) as Setting;            if (cell == null)            {                var values = _settings.Where(s => s.Index == indexPath.Row).FirstOrDefault();                cell = new Setting(values);                var views = NSBundle.MainBundle.LoadNib(Setting.Key, cell, null);                cell = Runtime.GetNSObject(views.ValueAt(0)) as Setting;            }            cell.SelectionStyle = UITableViewCellSelectionStyle.None;            cell?.PopulateData(_settings.Where(s => s.Index == indexPath.Row).FirstOrDefault(), this);            return cell;        }        public override void ViewWillLayoutSubviews()        {            base.ViewWillLayoutSubviews();        }
查看完整描述

1 回答

?
長風秋雁

TA貢獻1757條經驗 獲得超7個贊

升級到 Visual Studio for Mac 8.6.5 解決了該問題。



查看完整回答
反對 回復 2022-12-24
  • 1 回答
  • 0 關注
  • 109 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號