简体   繁体   中英

How to expand a tableview cell in Xamarin.iOS native platform?

I am trying to develop an application in Xamarin and I need to expand the tableview cell, but I don't have any idea about it. Can any one tell me hoe to implement the expandable/Collapsible table cell in Xamarin.ios?

There are several samples and tutorials you can refer to, you can also try to do it yourself:

  • Insert some rows or sections when you want to expand your tableView: tableView.InsertRows(new NSIndexPath[] { }, UITableViewRowAnimation.Automatic);
  • When you want to collapse try to use delete method: tableView.DeleteRows(new NSIndexPath[] { }, UITableViewRowAnimation.Automatic);

You can see these posts for more details:

TableView expanding and collapsing section with animation on touch

Create expandable tableview in Xamarin.iOS?

And samples:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM