How to customize NavigationLink accessory views in SwiftUI
18 July 2023
In UIKit, UITableViewCell
has a customizable accessory view. You can use one of the few accessory options that is provided by iOS by setting the accessoryType
property, or you can provide a custom view using accessoryView
, which can be any UIView
. The equivalent of constructing a UITableViewCell
with a chevron accessory in SwiftUI is using a NavigationLink
. Unfortunately, however, SwiftUI does not provide an API to customize the accessory view for a NavigationLink
— you are stuck with the default chevron.