-4

I have a challenge replicating basic UI elements in Xcode.

I am not aware how to replicate elements from this picture:

this picture.

The action that needs to happen is when clicking on "On site", a new view controller is opened.

I have assumed that "On Site" is a UIButton sitting on UIView white rectangle with grey border on top and bottom.

Is there a different/better way of doing this?

rmaddy
  • 298,130
  • 40
  • 468
  • 517
amenofis99
  • 21
  • 2

1 Answers1

0

You can implement your UI either using UITableView or UIStackView embedded in UIScrollView (if you have more content on your screen).

If you are going to use UITableView you need to implement custom UITableViewCell. It should contains a UILabel for text an UIImageView for checkbox. Since iOS doesn't have checkbox control on default. If user taps cell you can detect tap using UITableViewDelegate method didSelectRowAtIndexPath.

If you are going to use UIStackView you can use vertical stack view for two elements. And for each element you also need horizontal stackView with buttons and imageView for checkbox. By tapping buttons you can open required screen.

Eugene El
  • 81
  • 3