1
我有一个UITableView里面有2个文本标签。 我想将它们移动一点。UITableView填充文本和细节文本标签(ios,xamarin)
我发现了整个细胞高度的属性,但那不是一个即时通讯寻找。
哪个属性可以帮助我?
这里是代码:
using System;
using UIKit;
using System.Collections.Generic;
namespace iOSInputOutput
{
public class TableSource : UITableViewSource
{
List<string> gameNamesList;
List<string> gameIdsList;
string cellIdentifier = "TableCell";
public TableSource(List<string> games, List<string> ids)
{
gameNamesList = games;
gameIdsList = ids;
}
public override nint RowsInSection(UITableView tableview, nint section)
{
return gameIdsList.Count;
}
public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
{
UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);
//recucle cells that away from vision on screen
if (cell == null)
cell = new UITableViewCell(UITableViewCellStyle.Subtitle, cellIdentifier);
cell.TextLabel.Text = gameNamesList[indexPath.Row];
cell.DetailTextLabel.Text = gameIdsList[indexPath.Row];
//tableView.RowHeight = (nfloat) 124.0;
return cell;
}
}
}
非常感谢,很难得到任何答案的xamarin在这里。 似乎是非常罕见的平台或idk为什么会发生 – Vadim
因为每个人都在使用Xcode我想 – user3466447
btw如何在setUp()中移动它们? – Vadim