我的应用程序使用 UITableview 来显示图像提要。API 一次只提供这么多图像,所以我希望 tableview 中的最后一个单元格是具有Load More Button
. 为此,我创建了一个LoadMoreCell
带有标识符的自定义单元格LoadCell
使用GetCell
我做的方法:
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
// request a recycled cell to save memory
FeedCell cell = tableView.DequeueReusableCell (cellIdentifier) as FeedCell;
if(indexPath.Row >= tableItems.Count)
{
LoadMoreCell loadCell = tableView.DequeueReusableCell ("LoadCell") as LoadMoreCell;
return loadCell;
}
//Set Date and title
cell.SetInfo (ids[indexPath.Row], userID, tableItems [indexPath.Row]);
cell.SetImage (images[indexPath.Row]);
cell.parent = this.parent;
return cell;
}
这给了我一个底部的Load More Button
单元格,但单元格的尺寸与 a 相同,而FeedCell
不是 a 的较小尺寸LoadMoreCell
有人知道我的问题可能是什么吗?