-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves blur function to UIView, as it is not only for UIImageView (#1161)
- Loading branch information
Showing
7 changed files
with
71 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/SwifterSwift/UIKit/Deprecated/UIImageViewDeprecated.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// UIImageViewDeprecated.swift - Copyright 2023 SwifterSwift | ||
|
||
#if canImport(UIKit) && !os(watchOS) | ||
import UIKit | ||
|
||
// MARK: - Methods | ||
|
||
public extension UIImageView { | ||
/// SwifterSwift: Blurred version of an image view. | ||
/// | ||
/// - Parameter style: UIBlurEffectStyle (default is .light). | ||
/// - Returns: blurred version of self. | ||
@available( | ||
*, | ||
deprecated, | ||
message: "Use UIView.blur() instead. This method incorrectly does the same thing, as it doesn't copy the image view.") | ||
func blurred(withStyle style: UIBlurEffect.Style = .light) -> UIImageView { | ||
let imgView = self | ||
imgView.blur(withStyle: style) | ||
return imgView | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters