0

I am trying to make a settings screen with rows that have a toggle inside, like the one in the picture.

I have been trying with CPListTemplate and CPListItem, but I don't manage to show any toggle inside the item.

Have anyone managed to do it?

toggle CarPlay

Javier
  • 291
  • 2
  • 10
  • 1
    You cannot add a switch to a list item. You could show a check mark accessory and simply toggle it on/off when the item is tapped. You could also move your settings screen to the iPhone ui of your app; it is best to minimise the interaction required on a CarPlay interface – Paulw11 Dec 23 '22 at 20:25
  • @Paulw11 is correct. You could only fake this by providing a custom `accessoryImage` in the `CPListItem`'s initializer and changing the image using `setAccessoryImage(_:)`. – fruitcoder Jan 03 '23 at 14:32

0 Answers0