@@ -56,30 +56,83 @@ internal final class CustomizationViewController: QuickTableViewController {
5656 debugging,
5757
5858 Section ( title: " Switch " , rows: [
59- SwitchRow < CustomSwitchCell > ( title: " SwitchRow \n <CustomSwitchCell> " , switchValue: true , action: weakify ( self , type ( of: self ) . log) ) ,
60- CustomSwitchRow < SwitchCell > ( title: " CustomSwitchRow \n <SwitchCell> " , switchValue: false , action: weakify ( self , type ( of: self ) . log) )
59+ SwitchRow < CustomSwitchCell > (
60+ title: " SwitchRow \n <CustomSwitchCell> " ,
61+ switchValue: true ,
62+ customization: set ( label: " 0-0 " ) ,
63+ action: weakify ( self , type ( of: self ) . log)
64+ ) ,
65+ CustomSwitchRow < SwitchCell > (
66+ title: " CustomSwitchRow \n <SwitchCell> " ,
67+ switchValue: false ,
68+ customization: set ( label: " 0-1 " ) ,
69+ action: weakify ( self , type ( of: self ) . log)
70+ )
6171 ] ) ,
6272
6373 Section ( title: " Tap Action " , rows: [
64- TapActionRow < CustomTapActionCell > ( title: " TapActionRow \n <CustomTapActionCell> " , action: weakify ( self , type ( of: self ) . log) ) ,
65- CustomTapActionRow < TapActionCell > ( title: " CustomTapActionRow \n <TapActionCell> " , action: weakify ( self , type ( of: self ) . log) )
74+ TapActionRow < CustomTapActionCell > (
75+ title: " TapActionRow \n <CustomTapActionCell> " ,
76+ customization: set ( label: " 1-0 " ) ,
77+ action: weakify ( self , type ( of: self ) . log)
78+ ) ,
79+ CustomTapActionRow < TapActionCell > (
80+ title: " CustomTapActionRow \n <TapActionCell> " ,
81+ customization: set ( label: " 1-1 " ) ,
82+ action: weakify ( self , type ( of: self ) . log)
83+ )
6684 ] ) ,
6785
6886 Section ( title: " Navigation " , rows: [
69- NavigationRow ( title: " NavigationRow " , subtitle: . none, action: weakify ( self , type ( of: self ) . log) ) ,
70- NavigationRow < CustomCell > ( title: " NavigationRow<CustomCell> " , subtitle: . belowTitle( " .subtitle " ) , action: weakify ( self , type ( of: self ) . log) ) ,
71- CustomNavigationRow ( title: " CustomNavigationRow " , subtitle: . rightAligned( " .value1 " ) , action: weakify ( self , type ( of: self ) . log) ) ,
72- CustomNavigationRow < CustomCell > ( title: " CustomNavigationRow<CustomCell> " , subtitle: . leftAligned( " .value2 " ) , action: weakify ( self , type ( of: self ) . log) )
87+ NavigationRow (
88+ title: " NavigationRow " ,
89+ subtitle: . none,
90+ customization: set ( label: " 2-0 " ) ,
91+ action: weakify ( self , type ( of: self ) . log) ) ,
92+ NavigationRow < CustomCell > (
93+ title: " NavigationRow<CustomCell> " ,
94+ subtitle: . belowTitle( " .subtitle " ) ,
95+ customization: set ( label: " 2-1 " ) ,
96+ action: weakify ( self , type ( of: self ) . log)
97+ ) ,
98+ CustomNavigationRow (
99+ title: " CustomNavigationRow " ,
100+ subtitle: . rightAligned( " .value1 " ) ,
101+ customization: set ( label: " 2-2 " ) ,
102+ action: weakify ( self , type ( of: self ) . log)
103+ ) ,
104+ CustomNavigationRow < CustomCell > (
105+ title: " CustomNavigationRow<CustomCell> " ,
106+ subtitle: . leftAligned( " .value2 " ) ,
107+ customization: set ( label: " 2-3 " ) ,
108+ action: weakify ( self , type ( of: self ) . log)
109+ )
73110 ] ) ,
74111
75112 RadioSection ( title: " Radio Buttons " , options: [
76- OptionRow ( title: " OptionRow " , isSelected: false , action: weakify ( self , type ( of: self ) . log) ) ,
77- CustomOptionRow ( title: " CustomOptionRow " , isSelected: false , action: weakify ( self , type ( of: self ) . log) ) ,
78- CustomOptionRow < CustomOptionCell > ( title: " CustomOptionRow<CustomOptionCell> " , isSelected: false , action: weakify ( self , type ( of: self ) . log) )
113+ OptionRow (
114+ title: " OptionRow " ,
115+ isSelected: false ,
116+ customization: set ( label: " 3-0 " ) ,
117+ action: weakify ( self , type ( of: self ) . log)
118+ ) ,
119+ CustomOptionRow (
120+ title: " CustomOptionRow " ,
121+ isSelected: false ,
122+ customization: set ( label: " 3-1 " ) ,
123+ action: weakify ( self , type ( of: self ) . log)
124+ ) ,
125+ CustomOptionRow < CustomOptionCell > (
126+ title: " CustomOptionRow<CustomOptionCell> " ,
127+ isSelected: false ,
128+ customization: set ( label: " 3-2 " ) ,
129+ action: weakify ( self , type ( of: self ) . log)
130+ )
79131 ] ) ,
80132
81133 Section ( title: nil , rows: [
82134 NavigationRow ( title: " Customization closure " , subtitle: . none, customization: { cell, _ in
135+ cell. accessibilityLabel = " 4-0 "
83136 cell. accessoryView = UIImageView ( image: #imageLiteral( resourceName: " iconmonstr-x-mark " ) )
84137 } )
85138 ] )
@@ -96,6 +149,12 @@ internal final class CustomizationViewController: QuickTableViewController {
96149
97150 // MARK: - Private
98151
152+ private func set( label: String ) -> ( ( UITableViewCell , Row & RowStyle ) -> Void ) {
153+ return { cell, _ in
154+ cell. accessibilityLabel = label
155+ }
156+ }
157+
99158 private func log( _ sender: Row ) {
100159 if let option = sender as? OptionRowCompatible , !option. isSelected {
101160 return
0 commit comments