@@ -49,7 +49,7 @@ class ViewController: UITableViewController {
49
49
}
50
50
51
51
override func tableView( _ tableView: UITableView , heightForRowAt indexPath: IndexPath ) -> CGFloat {
52
- return UITableViewAutomaticDimension
52
+ return UITableView . automaticDimension
53
53
}
54
54
55
55
/*
@@ -71,7 +71,7 @@ class ViewController: UITableViewController {
71
71
warning. configureContent ( title: " Warning " , body: " Consider yourself warned. " , iconText: iconText)
72
72
warning. button? . isHidden = true
73
73
var warningConfig = SwiftMessages . defaultConfig
74
- warningConfig. presentationContext = . window( windowLevel: UIWindowLevelStatusBar )
74
+ warningConfig. presentationContext = . window( windowLevel: UIWindow . Level . statusBar )
75
75
76
76
let success = MessageView . viewFromNib ( layout: . cardView)
77
77
success. configureTheme ( . success)
@@ -80,7 +80,7 @@ class ViewController: UITableViewController {
80
80
success. button? . isHidden = true
81
81
var successConfig = SwiftMessages . defaultConfig
82
82
successConfig. presentationStyle = . center
83
- successConfig. presentationContext = . window( windowLevel: UIWindowLevelNormal )
83
+ successConfig. presentationContext = . window( windowLevel: UIWindow . Level . normal )
84
84
85
85
let info = MessageView . viewFromNib ( layout: . messageView)
86
86
info. configureTheme ( . info)
@@ -95,14 +95,14 @@ class ViewController: UITableViewController {
95
95
status. bodyLabel? . textColor = UIColor . white
96
96
status. configureContent ( body: " A tiny line of text covering the status bar. " )
97
97
var statusConfig = SwiftMessages . defaultConfig
98
- statusConfig. presentationContext = . window( windowLevel: UIWindowLevelStatusBar )
98
+ statusConfig. presentationContext = . window( windowLevel: UIWindow . Level . statusBar )
99
99
100
100
let status2 = MessageView . viewFromNib ( layout: . statusLine)
101
101
status2. backgroundView. backgroundColor = UIColor . orange
102
102
status2. bodyLabel? . textColor = UIColor . white
103
103
status2. configureContent ( body: " Switched to light status bar! " )
104
104
var status2Config = SwiftMessages . defaultConfig
105
- status2Config. presentationContext = . window( windowLevel: UIWindowLevelNormal )
105
+ status2Config. presentationContext = . window( windowLevel: UIWindow . Level . normal )
106
106
status2Config. preferredStatusBarStyle = . lightContent
107
107
108
108
SwiftMessages . show ( view: error)
@@ -120,7 +120,7 @@ class ViewController: UITableViewController {
120
120
imageView. clipsToBounds = true
121
121
let messageView = BaseView ( frame: . zero)
122
122
messageView. layoutMargins = . zero
123
- messageView. preferredHeight = 120.0
123
+ messageView. backgroundHeight = 120.0
124
124
do {
125
125
let backgroundView = CornerRoundingView ( )
126
126
backgroundView. cornerRadius = 15
@@ -131,7 +131,7 @@ class ViewController: UITableViewController {
131
131
}
132
132
messageView. configureDropShadow ( )
133
133
var config = SwiftMessages . defaultConfig
134
- config. presentationContext = . window( windowLevel: UIWindowLevelStatusBar )
134
+ config. presentationContext = . window( windowLevel: UIWindow . Level . statusBar )
135
135
SwiftMessages . show ( config: config, view: messageView)
136
136
}
137
137
@@ -141,7 +141,7 @@ class ViewController: UITableViewController {
141
141
view. getTacosAction = { _ in SwiftMessages . hide ( ) }
142
142
view. cancelAction = { SwiftMessages . hide ( ) }
143
143
var config = SwiftMessages . defaultConfig
144
- config. presentationContext = . window( windowLevel: UIWindowLevelStatusBar )
144
+ config. presentationContext = . window( windowLevel: UIWindow . Level . statusBar )
145
145
config. duration = . forever
146
146
config. presentationStyle = . bottom
147
147
config. dimMode = . gray( interactive: true )
@@ -160,7 +160,7 @@ class ViewController: UITableViewController {
160
160
config. presentationStyle = . center
161
161
config. duration = . forever
162
162
config. dimMode = . blur( style: . dark, alpha: 1 , interactive: true )
163
- config. presentationContext = . window( windowLevel: UIWindowLevelStatusBar )
163
+ config. presentationContext = . window( windowLevel: UIWindow . Level . statusBar )
164
164
SwiftMessages . show ( config: config, view: messageView)
165
165
}
166
166
}
0 commit comments