@@ -34,16 +34,16 @@ class ControlsViewController: UITableViewController {
3434
3535 sections = [
3636 Section ( headerView: UITableViewHeaderFooterView ( text: " Buttons " ) , cells: [
37- LMTableViewCell (
37+ LMTableViewCell ( ) {
3838 UIButton ( configuration: . plain( ) , primaryAction: UIAction ( title: " Plain " ) { [ unowned self] _ in
3939 showGreeting ( )
4040 } )
41- ) ,
42- LMTableViewCell (
41+ } ,
42+ LMTableViewCell ( ) {
4343 UIButton ( configuration: . tinted( ) , primaryAction: UIAction ( title: " Toggle " ) { _ in } ,
4444 changesSelectionAsPrimaryAction: true )
45- ) ,
46- LMTableViewCell (
45+ } ,
46+ LMTableViewCell ( ) {
4747 UIButton ( configuration: . borderedTinted( ) , primaryAction: UIAction ( title: " Pop-Up " ) { _ in } ,
4848 menu: UIMenu ( children: [
4949 UIAction ( title: " One " ) { _ in } ,
@@ -53,8 +53,8 @@ class ControlsViewController: UITableViewController {
5353 ] ) ,
5454 showsMenuAsPrimaryAction: true ,
5555 tintColor: . red)
56- ) ,
57- LMTableViewCell (
56+ } ,
57+ LMTableViewCell ( ) {
5858 UIButton ( configuration: . borderedTinted( ) ,
5959 menu: UIMenu ( children: [
6060 UIAction ( title: " One " ) { _ in } ,
@@ -65,57 +65,57 @@ class ControlsViewController: UITableViewController {
6565 showsMenuAsPrimaryAction: true ,
6666 changesSelectionAsPrimaryAction: true ,
6767 tintColor: . green)
68- )
68+ }
6969 ] ) ,
7070
7171 Section ( headerView: UITableViewHeaderFooterView ( text: " Text " ) , cells: [
72- LMTableViewCell (
72+ LMTableViewCell ( ) {
7373 UITextField ( placeholder: " Default " )
74- ) ,
75- LMTableViewCell (
74+ } ,
75+ LMTableViewCell ( ) {
7676 UITextField ( placeholder: " Number " , keyboardType: . numberPad)
77- ) ,
78- LMTableViewCell (
77+ } ,
78+ LMTableViewCell ( ) {
7979 UITextField ( placeholder: " Email Address " , keyboardType: . emailAddress)
80- ) ,
81- LMTableViewCell (
80+ } ,
81+ LMTableViewCell ( ) {
8282 UITextField ( placeholder: " Password " , isSecureTextEntry: true )
83- ) ,
84- LMTableViewCell (
83+ } ,
84+ LMTableViewCell ( ) {
8585 UITextView ( height: 90 ) { textView in
8686 textView. textContainer. lineFragmentPadding = 0
8787
8888 textView. text = " This is a multi-line text view. "
8989 }
90- )
90+ }
9191 ] ) ,
9292
9393 Section ( headerView: UITableViewHeaderFooterView ( text: " Selection " ) , cells: [
9494 UITableViewCell ( style: . default, text: " On/Off " , selectionStyle: . none) { tableViewCell in
9595 tableViewCell. accessoryView = UISwitch ( )
9696 } ,
97- LMTableViewCell (
97+ LMTableViewCell ( ) {
9898 UISegmentedControl ( items: [
9999 " One " , " Two " , " Three " , " Four "
100100 ] , primaryAction: UIAction ( ) { [ unowned self] _ in
101101 segmentedControlValueChanged ( )
102102 } ) {
103103 segmentedControl = $0
104104 }
105- ) ,
106- LMTableViewCell (
105+ } ,
106+ LMTableViewCell ( ) {
107107 UIDatePicker ( datePickerMode: . dateAndTime)
108- )
108+ }
109109 ] ) ,
110110
111- Section ( headerView: LMTableViewHeaderFooterView (
111+ Section ( headerView: LMTableViewHeaderFooterView ( ) {
112112 LMRowView ( ) {
113113 UILabel ( text: " Custom Header " , textColor: . gray, font: . preferredFont( forTextStyle: . headline) )
114114 LMSpacer ( )
115115 UIImageView ( image: UIImage ( systemName: " questionmark.circle " ) , contentMode: . center, tintColor: . gray)
116116 }
117- ) , cells: [
118- LMTableViewCell (
117+ } , cells: [
118+ LMTableViewCell ( ) {
119119 LMRowView ( ) {
120120 LMSpacer ( )
121121 UIStepper ( primaryAction: UIAction ( ) { [ unowned self] action in
@@ -125,29 +125,29 @@ class ControlsViewController: UITableViewController {
125125 }
126126 LMSpacer ( )
127127 }
128- ) ,
129- LMTableViewCell (
128+ } ,
129+ LMTableViewCell ( ) {
130130 UISlider ( primaryAction: UIAction ( ) { [ unowned self] action in
131131 sliderValueChanged ( )
132132 } ) {
133133 slider = $0
134134 }
135- ) ,
136- LMTableViewCell (
135+ } ,
136+ LMTableViewCell ( ) {
137137 UIPageControl ( pageIndicatorTintColor: . lightGray,
138138 currentPageIndicatorTintColor: . black) { pageControl in
139139 pageControl. numberOfPages = 11
140140
141141 self . pageControl = pageControl
142142 }
143- ) ,
144- LMTableViewCell (
143+ } ,
144+ LMTableViewCell ( ) {
145145 LMColumnView ( topMargin: 8 , bottomMargin: 8 ) {
146146 UIProgressView ( ) {
147147 progressView = $0
148148 }
149149 }
150- )
150+ }
151151 ] )
152152 ]
153153 }
0 commit comments