Lock.swift:スタイルカスタマイズのオプション
以下に記載されているように、Lockのスタイルと外観を設定するオプションは数多くあります。また、動作設定オプションページには、Lockの動作や機能を変更するオプションも多数用意されています。
Lockの外観をカスタマイズする
withStyle
を使用して、Lockの初期設定にスタイルカスタマイズのオプションを追加できます。
Lock
.classic()
.withStyle {
$0.title = "Company LLC"
$0.logo = LazyImage(name: "company_logo")
$0.primaryColor = UIColor(red: 0.6784, green: 0.5412, blue: 0.7333, alpha: 1.0)
}
.present(from: self)
Was this helpful?
ヘッダーのスタイルオプション
headerBlur
ぼかし効果スタイルが使用されます。UIBlurEffectStyle
で定義されている任意の値を使用できます。
.withStyle {
$0.headerBlur = .extraLight
}
Was this helpful?
headerColor
ヘッダーの背景に使用される色。デフォルトでは色はなく、ただのぼかしです。
.withStyle {
$0.headerColor = UIColor? = nil
}
Was this helpful?
ロゴ
ヘッダーのロゴ画像。推奨される最小解像度は200ピクセル(幅) x 200ピクセル(高さ)です。
.withStyle {
$0.logo = LazyImage(name: "company_logo")
}
Was this helpful?
headerCloseIcon
ヘッダーの「閉じる」アイコンを変更できます。
.withStyle {
$0.headerCloseIcon = LazyImage(name: "ic_close")
}
Was this helpful?
headerBackIcon
ヘッダーの「戻る」アイコンを変更できます。
.withStyle {
$0.headerBackIcon = LazyImage(name: "ic_close")
}
Was this helpful?
タイトルのスタイルオプション
hideTitle
ヘッダータイトルを非表示にして、ロゴのみを表示します。デフォルトでは、このオプションはfalseです。
.withStyle {
$0.hideTitle = false
}
Was this helpful?
title
ヘッダーに使用されるタイトルテキスト。
.withStyle {
$0.title = "Company LLC"
}
Was this helpful?
titleColor
ヘッダータイトルに使用される色。
.withStyle {
$0.titleColor = UIColor.black
}
Was this helpful?
ボタンとコンポーネントのスタイルオプション
buttonTintColor
プライマリボタンの色合いとして使用される色。
.withStyle {
$0.buttonTintColor = UIColor.white
}
Was this helpful?
disabledColor
Lockが無効のコンポーネントの色として使用される色。
.withStyle {
$0.disabledColor = UIColor(red: 0.8902, green: 0.898, blue: 0.9059, alpha: 1.0)
}
Was this helpful?
disabledTextColor
Lockが無効のコンポーネントテキストの色として使用される色。
.withStyle {
$0.disabledTextColor = UIColor(red: 0.5725, green: 0.5804, blue: 0.5843, alpha: 1.0)
}
Was this helpful?
hideButtonTitle
プライマリボタンのタイトルを非表示にし、アイコンのみを表示します。デフォルトでは、このオプションはfalseです。
.withStyle {
$0.hideButtonTitle = false
}
Was this helpful?
primaryColor
Lockの原色として使用される色。
.withStyle {
$0.primaryColor = UIColor.orange
}
Was this helpful?
入力フィールドのスタイル
inputTextColor
入力フィールドのテキストの色。
.withStyle {
$0.inputTextColor = UIColor.black
}
Was this helpful?
inputPlaceholderTextColor
入力フィールドのプレースホルダーテキストの色。
.withStyle {
$0.inputPlaceholderTextColor = UIColor(red: 0.780, green: 0.780, blue: 0.804, alpha: 1.00)
}
Was this helpful?
inputBorderColor
入力フィールドの境界線の色。
.withStyle {
$0.inputBorderColor = UIColor(red: 0.780, green: 0.780, blue: 0.804, alpha: 1.00)
}
Was this helpful?
inputBorderColorError
無効な値が入力された入力フィールドの境界線の色。
.withStyle {
$0.inputBorderColorError = UIColor.red
}
Was this helpful?
inputBackgroundColor
入力フィールドの背景の色。
.withStyle {
$0.inputBackgroundColor = UIColor.white
}
Was this helpful?
inputIconBackgroundColor
入力フィールドアイコンの背景の色。
.withStyle {
$0.inputIconBackgroundColor = UIColor(red: 0.9333, green: 0.9333, blue: 0.9333, alpha: 1.0)
}
Was this helpful?
inputIconColor
入力フィールドアイコンの色。
.withStyle {
$0.inputIconColor = UIColor(red: 0.5725, green: 0.5804, blue: 0.5843, alpha: 1.0)
}
Was this helpful?
ステータスバーのスタイル
UIStatusBarAnimation
Lock Controllerのステータスバーの更新アニメーション。
.withStyle {
$0.UIStatusBarAnimation = .none
}
Was this helpful?
statusBarHidden
Lockコントローラーのステータスバーの表示/非表示。
.withStyle {
$0.statusBarHidden = false
}
Was this helpful?
UIStatusBarStyle
Lockコントローラーのステータスバーのスタイル。
.withStyle {
$0.UIStatusBarStyle = .default
}
Was this helpful?
UISearchBarStyle
Lockパスワードレス検索バーのスタイル。
.withStyle {
$0.UISearchBarStyle = .default
}
Was this helpful?
その他のスタイルオプション
textColor
本文のテキストの色。
.withStyle {
$0.textColor = UIColor.black
}
Was this helpful?
backgroundColor
Lockの背景色として使用される色。
.withStyle {
$0.backgroundColor = UIColor.white
}
Was this helpful?
backgroundImage
Lockの背景として使用される画像。
.withStyle {
$0.backgroundImage = LazyImage(name: "company_logo")
}
Was this helpful?
oauth2
非dbのOAuth2接続は、AuthStyle
で接続名をマッピングすることでスタイルをカスタマイズできます。
.withStyle {
$0.oauth2["slack"] = AuthStyle(
name: "Slack",
color: UIColor(red: 0.4118, green: 0.8078, blue: 0.6588, alpha: 1.0),
withImage: LazyImage(name: "ic_slack")
)
}
Was this helpful?
seperatorTextColor
ソーシャルセパレーターのラベルの色。
.withStyle {
$0.seperatorTextColor = UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.54)
}
Was this helpful?
secondaryButtonColor
セカンダリボタンの色。
.withStyle {
$0.secondaryButtonColor = UIColor.black
}
Was this helpful?
tabTextColor
データベースのログインタブ上のテキストの色。
.withStyle {
$0.tabTextColor = UIColor(red: 0.3608, green: 0.4, blue: 0.4353, alpha: 0.6)
}
Was this helpful?
tabTintColor
データベースのログインタブ上の着色。
.withStyle {
$0.tabTintColor = UIColor(red: 0.3608, green: 0.4, blue: 0.4353, alpha: 0.6)
}
Was this helpful?