9
votes

Basically, I want to make something similar as Apple did with the Wi-Fi Networks settings on the iPad. Seemingly, there are static cells to turn WiFi on or off and a toggle to ask to join networks, and a dynamic part which shows the available wireless networks in another section. Any idea on how Apple did implement this? Is it just a dynamic UITableView with some fixed cells?

Or did they embed a UITableView in a static tableview cell in the static uitableview?

Wi-Fi Networks

I tried several approaches, adding two UITableView s (one static and one dynamic) to a UITableViewController but that did not work. I tried adding a static UITableView to a UIViewController, but apparently a static UITableView needs a UITableViewController.

The only solution I came by is on devforums but that one seems quite cumbersome to me, and might not be compatible with future versions of iOS.

2
Try setting a ios or iphone tag, you might get a better response - rogermushroom
Sadly there's no way to do this using static cells for the static parts, seems like such a waste :( - trapper

2 Answers

3
votes

I did a project which uses pretty much the same approach, in one of its' views, there is one uitableview, with dynamic cells.

set section number = 3.

when setting row number in each section, return a fix number for fix cell(wifi on-off) and [array count] for dynamic(wifi stations).

when setting up cells, check what section uses indexPath.section, then configure your cell

0
votes

OK, we have a UITableView with three sections.

  • Section 1 has one static cell. No problem.
  • Section 2 has a lot of static cells of which not all are displayed. By setting the number of cells in the section dynamically at run time the number of cells displayed is changed. Right?
  • Section three is again a single cell.

Sounds pretty simple I think.