Skip to content

Commit

Permalink
refactor: 3항연산자, colorset, button type
Browse files Browse the repository at this point in the history
  • Loading branch information
yuncheol-AHN committed Nov 10, 2024
1 parent 41c9b76 commit b501169
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {

window = UIWindow(windowScene: windowScene)

let initialViewController: UIViewController
if UserDefaults.standard.object(forKey: Constant.houseName) == nil {
initialViewController = RegisterViewController()
} else {
initialViewController = HomeViewController()
}
let initialViewController = UserDefaults.standard.object(forKey: Constant.houseName) == nil
? RegisterViewController()
: HomeViewController()

let navigationController = UINavigationController(rootViewController: initialViewController)
window?.rootViewController = navigationController
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x47",
"green" : "0x47",
"red" : "0x47"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ public final class RegisterViewController: UIViewController {
return textField
}()
private let registerButton: UIButton = {
let registerButton = UIButton()
let registerButton = UIButton(type: .custom)

var attributedString = AttributedString(stringLiteral: "다음")
attributedString.font = UIFont.ownglyphBerry(size: registerButtonFontSize)
attributedString.strokeColor = UIColor.mhTitle

registerButton.setAttributedTitle(NSAttributedString(attributedString), for: .normal)

registerButton.titleLabel?.textColor = #colorLiteral(red: 0.1843137255, green: 0.1843137255, blue: 0.1843137255, alpha: 1)
registerButton.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
registerButton.layer.borderColor = #colorLiteral(red: 0.7019607843, green: 0.1490196078, blue: 0.1176470588, alpha: 1)
registerButton.backgroundColor = UIColor.mhSection
registerButton.layer.borderColor = UIColor.mhBorder.cgColor
registerButton.layer.borderWidth = 1
registerButton.layer.cornerRadius = registerButtonFontSize

Expand Down

0 comments on commit b501169

Please sign in to comment.