-1

I have a question. I am trying to create an expandable FAQ menu without using a tableviewcontroller. The reason I don't want to use a tableview is because I don't want expandable cells, rather, I want a buttonclick to reveal a label while also sliding down any other buttons on this page.

Here is an example of what I'm trying to do.

I'm using Swift in Xcode 7.3

If anyone has any suggestions/knows of a tutorial/a forum post, it would be greatly appreciated.

Thank You.

Wain
  • 118,658
  • 15
  • 128
  • 151
TheDon
  • 1

1 Answers1

0

Sure,nyou could use buttons, and either change constraints on label heights or dynamically add labels. That's a lot of effort and code.

Or, you could use a table view and one of the myriad guides. Remember that table views don't have to be selectable on ever row, and they don't have to display row separator lines (UI).

Indeed you could disable selection on all rows and add buttons to some rows, though I'd personally say that's overkill and why require the user to be 100% accurate with the tap on a button which in your sample image doesn't even look like a button.

Wain
  • 118,658
  • 15
  • 128
  • 151