@@ -117,8 +117,8 @@ open class PermissionButton: UIButton {
117
117
- parameter state: The state that uses the specified title.
118
118
*/
119
119
open func setTitle( _ title: String ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
120
- guard [ . highlighted] . contains ( state) else { return }
121
-
120
+ // guard [.highlighted].contains(state) else { return }
121
+
122
122
if titles [ state] == nil {
123
123
titles [ state] = [ : ]
124
124
}
@@ -133,8 +133,8 @@ open class PermissionButton: UIButton {
133
133
- parameter state: The state that uses the specifed titles.
134
134
*/
135
135
open func setTitles( _ titles: [ PermissionStatus : String ? ] , forState state: UIControlState = UIControlState ( ) ) {
136
- guard [ . highlighted] . contains ( state) else { return }
137
-
136
+ // guard [.highlighted].contains(state) else { return }
137
+
138
138
if self . titles [ state] == nil {
139
139
self . titles [ state] = [ : ]
140
140
}
@@ -177,8 +177,8 @@ open class PermissionButton: UIButton {
177
177
- parameter state: The state that uses the specified title.
178
178
*/
179
179
open func setAttributedTitle( _ title: NSAttributedString ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
180
- guard [ . highlighted] . contains ( state) else { return }
181
-
180
+ // guard [.highlighted].contains(state) else { return }
181
+
182
182
if attributedTitles [ state] == nil {
183
183
attributedTitles [ state] = [ : ]
184
184
}
@@ -193,8 +193,8 @@ open class PermissionButton: UIButton {
193
193
- parameter state: The state that uses the specified titles.
194
194
*/
195
195
open func setAttributedTitles( _ titles: [ PermissionStatus : NSAttributedString ? ] , forState state: UIControlState = UIControlState ( ) ) {
196
- guard [ . highlighted] . contains ( state) else { return }
197
-
196
+ // guard [.highlighted].contains(state) else { return }
197
+
198
198
if attributedTitles [ state] == nil {
199
199
attributedTitles [ state] = [ : ]
200
200
}
@@ -237,8 +237,8 @@ open class PermissionButton: UIButton {
237
237
- parameter state: The state that uses the specified color.
238
238
*/
239
239
open func setTitleColor( _ color: UIColor ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
240
- guard [ . highlighted] . contains ( state) else { return }
241
-
240
+ // guard [.highlighted].contains(state) else { return }
241
+
242
242
if titleColors [ state] == nil {
243
243
titleColors [ state] = [ : ]
244
244
}
@@ -253,8 +253,8 @@ open class PermissionButton: UIButton {
253
253
- parameter state: The state that uses the specified colors.
254
254
*/
255
255
open func setTitleColors( _ colors: [ PermissionStatus : UIColor ? ] , forState state: UIControlState = UIControlState ( ) ) {
256
- guard [ . highlighted] . contains ( state) else { return }
257
-
256
+ // guard [.highlighted].contains(state) else { return }
257
+
258
258
if titleColors [ state] == nil {
259
259
titleColors [ state] = [ : ]
260
260
}
@@ -297,8 +297,8 @@ open class PermissionButton: UIButton {
297
297
- parameter state: The state that uses the specified color.
298
298
*/
299
299
open func setTitleShadowColor( _ color: UIColor ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
300
- guard [ . highlighted] . contains ( state) else { return }
301
-
300
+ // guard [.highlighted].contains(state) else { return }
301
+
302
302
if titleShadowColors [ state] == nil {
303
303
titleShadowColors [ state] = [ : ]
304
304
}
@@ -313,8 +313,8 @@ open class PermissionButton: UIButton {
313
313
- parameter state: The state that uses the specified colors.
314
314
*/
315
315
open func setTitleShadowColors( _ colors: [ PermissionStatus : UIColor ? ] , forState state: UIControlState = UIControlState ( ) ) {
316
- guard [ . highlighted] . contains ( state) else { return }
317
-
316
+ // guard [.highlighted].contains(state) else { return }
317
+
318
318
if titleShadowColors [ state] == nil {
319
319
titleShadowColors [ state] = [ : ]
320
320
}
@@ -357,8 +357,8 @@ open class PermissionButton: UIButton {
357
357
- parameter state: The state that uses the specified image.
358
358
*/
359
359
open func setImage( _ image: UIImage ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
360
- guard [ . highlighted] . contains ( state) else { return }
361
-
360
+ // guard [.highlighted].contains(state) else { return }
361
+
362
362
if images [ state] == nil {
363
363
images [ state] = [ : ]
364
364
}
@@ -373,8 +373,8 @@ open class PermissionButton: UIButton {
373
373
- parameter state: The state that uses the specified images.
374
374
*/
375
375
open func setImages( _ images: [ PermissionStatus : UIImage ] , forState state: UIControlState = UIControlState ( ) ) {
376
- guard [ . highlighted] . contains ( state) else { return }
377
-
376
+ // guard [.highlighted].contains(state) else { return }
377
+
378
378
if self . images [ state] == nil {
379
379
self . images [ state] = [ : ]
380
380
}
@@ -417,8 +417,8 @@ open class PermissionButton: UIButton {
417
417
- parameter state: The state that uses the specified image.
418
418
*/
419
419
open func setBackgroundImage( _ image: UIImage ? , forStatus status: PermissionStatus , andState state: UIControlState = UIControlState ( ) ) {
420
- guard [ . highlighted] . contains ( state) else { return }
421
-
420
+ // guard [.highlighted].contains(state) else { return }
421
+
422
422
if backgroundImages [ state] == nil {
423
423
backgroundImages [ state] = [ : ]
424
424
}
@@ -433,8 +433,8 @@ open class PermissionButton: UIButton {
433
433
- parameter state: The state that uses the specified images.
434
434
*/
435
435
open func setBackgroundImages( _ images: [ PermissionStatus : UIImage ] , forState state: UIControlState = UIControlState ( ) ) {
436
- guard [ . highlighted] . contains ( state) else { return }
437
-
436
+ // guard [.highlighted].contains(state) else { return }
437
+
438
438
if backgroundImages [ state] == nil {
439
439
backgroundImages [ state] = [ : ]
440
440
}
0 commit comments