-1

I'm trying to make a view similar to the one on the screenshot. The question is what is the first element(the one with label and chevron) When I tap on it, it behaves like a table cell(on the screenshot I captured it in tapped state). Thank you!

enter image description here

UPDATE I ended up creating 2 sections and then checked for index

kirqe
  • 2,402
  • 3
  • 32
  • 57

3 Answers3

2

Looks to me exactly like a standard UITableView cell, with cell.accessoryType = .disclosureIndicator and the background color etc. changed of course.

SwiftArtery
  • 267
  • 1
  • 8
  • Looks like it was table view controller with 2 sections. The first one's with static cell and without header. – kirqe Sep 15 '19 at 16:57
1

Honestly looks like the standard table view cell, but you could easily implement this with a custom view (NIB) as well.

Alan
  • 1,132
  • 6
  • 15
1

You can build this view with UITableViewDelegate like this:

  1. Make a button in the cell and set this image to the button.
  2. Set yourButton.isHidden = true in cellForRowAtIndexPath
  3. Set yourButton.isHidden = false in didSelectRowAtIndextPath

That's it.

Daniel
  • 3,073
  • 12
  • 33
Ekramul Hoque
  • 612
  • 4
  • 15