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

Support iOS 13 dark appearance #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions HGPlaceholders/Classes/Placeholder/PlaceholderStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public struct PlaceholderStyle {

// MARK: properties

/// The color of the placeholder title, the default value is darkText
public var titleColor: UIColor = .darkText
/// The color of the placeholder title, the default value is darkText or label (in iOS 13 and above)
public var titleColor: UIColor = HGColor.darkText
/// The font of the placeholder title, the default value is boldSystemFont 19
public var titleFont = UIFont.boldSystemFont(ofSize: 19)
/// The text alignment of the placeholder title, the default value is NSTextAlignment.center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,10 @@ extension PlaceholdersProvider {

struct HGColor {
static let violet = UIColor(red: 250.0/255.0, green: 222.0/255.0, blue: 251.0/255.0, alpha: 1.0)
static var darkText: UIColor {
if #available(iOS 13, *) {
return .label
}
return .darkText
}
}