How do i create an accordion control similar to on

2019-06-09 11:50发布

问题:

I want create an accordion control similar to one created using AJAX http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Accordion/Accordion.aspx where I can place icons instead of text for iPhone.

回答1:

Basically you want to use an expandable UITableView - when you tap a cell you reveal a number of cells beneath it (the contents of your accordion). You don't necessarily need to use a table view, but typically it's a good starting point.

There are a couple of controllers that have been put out in the open - this one, for example - but it's not too difficult to write yourself once you know a bit about table views and removing/adding cells.