@@ -31,7 +31,7 @@ internal final class DefaultViewController: QuickTableViewController {
3131
3232 // MARK: - Properties
3333
34- private let debugging = Section ( title: nil , rows: [ NavigationRow ( title : " " , subtitle : . none) ] )
34+ private let debugging = Section ( title: nil , rows: [ NavigationRow ( text : " " , detailText : . none) ] )
3535
3636 // MARK: - UIViewController
3737
@@ -45,25 +45,25 @@ internal final class DefaultViewController: QuickTableViewController {
4545
4646 tableContents = [
4747 Section ( title: " Switch " , rows: [
48- SwitchRow ( title : " Setting 1 " , switchValue: true , icon: . image( globe) , action: didToggleSwitch ( ) ) ,
49- SwitchRow ( title : " Setting 2 " , switchValue: false , icon: . image( time) , action: didToggleSwitch ( ) )
48+ SwitchRow ( text : " Setting 1 " , switchValue: true , icon: . image( globe) , action: didToggleSwitch ( ) ) ,
49+ SwitchRow ( text : " Setting 2 " , switchValue: false , icon: . image( time) , action: didToggleSwitch ( ) )
5050 ] ) ,
5151
5252 Section ( title: " Tap Action " , rows: [
53- TapActionRow ( title : " Tap action " , action: showAlert ( ) )
53+ TapActionRow ( text : " Tap action " , action: showAlert ( ) )
5454 ] ) ,
5555
5656 Section ( title: " Navigation " , rows: [
57- NavigationRow ( title : " CellStyle.default " , subtitle : . none, icon: . image( gear) ) ,
58- NavigationRow ( title : " CellStyle " , subtitle : . belowTitle ( " .subtitle " ) , icon: . image( globe) ) ,
59- NavigationRow ( title : " CellStyle " , subtitle : . rightAligned ( " .value1 " ) , icon: . image( time) , action: showDetail ( ) ) ,
60- NavigationRow ( title : " CellStyle " , subtitle : . leftAligned ( " .value2 " ) )
57+ NavigationRow ( text : " CellStyle.default " , detailText : . none, icon: . image( gear) ) ,
58+ NavigationRow ( text : " CellStyle " , detailText : . subtitle ( " .subtitle " ) , icon: . image( globe) ) ,
59+ NavigationRow ( text : " CellStyle " , detailText : . value1 ( " .value1 " ) , icon: . image( time) , action: showDetail ( ) ) ,
60+ NavigationRow ( text : " CellStyle " , detailText : . value2 ( " .value2 " ) )
6161 ] , footer: " UITableViewCellStyle.Value2 hides the image view. " ) ,
6262
6363 RadioSection ( title: " Radio Buttons " , options: [
64- OptionRow ( title : " Option 1 " , isSelected: true , action: didToggleSelection ( ) ) ,
65- OptionRow ( title : " Option 2 " , isSelected: false , action: didToggleSelection ( ) ) ,
66- OptionRow ( title : " Option 3 " , isSelected: false , action: didToggleSelection ( ) )
64+ OptionRow ( text : " Option 1 " , isSelected: true , action: didToggleSelection ( ) ) ,
65+ OptionRow ( text : " Option 2 " , isSelected: false , action: didToggleSelection ( ) ) ,
66+ OptionRow ( text : " Option 3 " , isSelected: false , action: didToggleSelection ( ) )
6767 ] , footer: " See RadioSection for more details. " ) ,
6868
6969 debugging
@@ -83,7 +83,7 @@ internal final class DefaultViewController: QuickTableViewController {
8383 private func didToggleSelection( ) -> ( Row ) -> Void {
8484 return { [ weak self] in
8585 if let option = $0 as? OptionRowCompatible {
86- let state = " \( option. title ) is " + ( option. isSelected ? " selected " : " deselected " )
86+ let state = " \( option. text ) is " + ( option. isSelected ? " selected " : " deselected " )
8787 self ? . showDebuggingText ( state)
8888 }
8989 }
@@ -92,7 +92,7 @@ internal final class DefaultViewController: QuickTableViewController {
9292 private func didToggleSwitch( ) -> ( Row ) -> Void {
9393 return { [ weak self] in
9494 if let row = $0 as? SwitchRowCompatible {
95- let state = " \( row. title ) = \( row. switchValue) "
95+ let state = " \( row. text ) = \( row. switchValue) "
9696 self ? . showDebuggingText ( state)
9797 }
9898 }
@@ -110,7 +110,7 @@ internal final class DefaultViewController: QuickTableViewController {
110110
111111 private func showDetail( ) -> ( Row ) -> Void {
112112 return { [ weak self] in
113- let detail = $0. title + ( $0. subtitle ? . text ?? " " )
113+ let detail = $0. text + ( $0. detailText ? . text ?? " " )
114114 let controller = UIViewController ( )
115115 controller. view. backgroundColor = . white
116116 controller. title = detail
@@ -121,7 +121,7 @@ internal final class DefaultViewController: QuickTableViewController {
121121
122122 private func showDebuggingText( _ text: String ) {
123123 print ( text)
124- debugging. rows = [ NavigationRow ( title : text, subtitle : . none) ]
124+ debugging. rows = [ NavigationRow ( text : text, detailText : . none) ]
125125 DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.2 ) { [ weak self] in
126126 self ? . tableView. reloadData ( )
127127 }
0 commit comments