Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: (#1208) deprecated ν† μŠ€νŠΈ ν•¨μˆ˜ 제거 #1261

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public extension UIViewController {
)
}

@_disfavoredOverload
func showToast(
text: String,
font: UIFont = UIFont(name: "Pretendard-Light", size: 14) ??
Expand Down Expand Up @@ -92,44 +91,6 @@ public extension UIViewController {
SwiftEntryKit.display(entry: contentView, using: attributes)
}

@available(*, deprecated, message: "ν† μŠ€νŠΈ μœ„μΉ˜ μ‘°μ • λ²„μ „μœΌλ‘œ κ°œμ„ ")
func showToast(
text: String,
font: UIFont = UIFont(name: "Pretendard-Light", size: 14) ??
.systemFont(ofSize: 14, weight: .light),
verticalOffset: CGFloat? = nil
) {
var attributes = EKAttributes.bottomFloat
attributes.displayDuration = 2
attributes.entryBackground = .color(color: EKColor(rgb: 0x101828).with(alpha: 0.8))
attributes.roundCorners = .all(radius: 20)
attributes.entranceAnimation = EKAttributes.Animation.init(
translate: .init(duration: 0.3),
fade: .init(from: 0, to: 1, duration: 0.3)
)
attributes.exitAnimation = EKAttributes.Animation.init(
fade: .init(from: 1, to: 0, duration: 0.3)
)

if let verticalOffset = verticalOffset {
attributes.positionConstraints.verticalOffset = verticalOffset
}

let style = EKProperty.LabelStyle(
font: font,
color: EKColor(rgb: 0xFCFCFD),
alignment: .center
)
let labelContent = EKProperty.LabelContent(
text: text,
style: style
)

let contentView = EKNoteMessageView(with: labelContent)
contentView.verticalOffset = 10
SwiftEntryKit.display(entry: contentView, using: attributes)
}

func hideKeyboardWhenTappedAround() {
let tap = UITapGestureRecognizer(target: self, action: #selector(UIViewController.dismissKeyboard))
tap.cancelsTouchesInView = false
Expand Down
Loading