如何在Xamarin.iOS本机平台中扩展tableview单元格?

问题描述 投票:0回答:1

我正在尝试在Xamarin中开发一个应用程序,我需要扩展tableview单元格,但我对此一无所知。任何人都可以告诉我在Xamarin.ios中实现可扩展/可折叠表格单元吗?

c# xamarin.ios
1个回答
0
投票

您可以参考几个示例和教程,您也可以尝试自己完成:

  • 如果要扩展tableView,请插入一些行或部分:tableView.InsertRows(new NSIndexPath[] { }, UITableViewRowAnimation.Automatic);
  • 如果要折叠,请尝试使用delete方法:tableView.DeleteRows(new NSIndexPath[] { }, UITableViewRowAnimation.Automatic);

您可以查看这些帖子了解更多详情:

TableView expanding and collapsing section with animation on touch

Create expandable tableview in Xamarin.iOS?

和样品:

https://github.com/b099l3/StackOverflow/tree/master/ExpandableTableView https://github.com/TheEightBot/EightBot.AutoExpandAndCollapse https://github.com/brminnick/ExpandableList https://github.com/iSofTom/STCollapseTableView

© www.soinside.com 2019 - 2024. All rights reserved.