We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DesignSystem νμ ν΄λμμ ν΄λΉ λ΄μ©μ νμΈν μ μμ΅λλ€
DesignSystem
extension CGFloat { struct AK { static let commonHorizontal: CGFloat = 25.0 } }
constraints μμ± μ λμμΈκ°μ΄λμ μν₯μ λ°λ SpacingμΈμ§ κ³ λ €ν©λλ€. κ³΅ν΅ μμμ λ°λ₯΄λ κ°μ΄λΌλ©΄ DesingSystemμ λͺ μλ Spacingμ λ°λΌ μμ±νκ³ , ν΄λΉ κ°μ΄ λ³λλλ©΄ μ±μ λͺ¨λ λ·°κ° λ³λ λ μ μλλ‘ ν©λλ€.
constraints
Spacing
DesingSystem
μμ μμ tableViewλ ν΄λΉ λ·°μ κ·μλλ κ°λ μ΄ μλ μ°λ¦¬ μ± μλΉμ€μ μΌκ΄μ±μ μν κ°κ²©μ νμλ‘ ν΄ λ³΄μ λλ€. κ·Έλ¬λ μ«μλ₯Ό μ§μ μ λ ₯νλ κ²μ΄ μλ(νλμ½λ©) κΈ°λ³Έ Spacing μ κΈ°μ νμ¬ μΆν λ³λμ λλΉν©λλ€ (μ’μ° κ°κ²©μ 30μΌλ‘ λνλ κ²°μ μ νλ€λ©΄ DesignSystemλ§ λ³κ²½ν΄μ£Όμ΄λ λκ²)
tableView
NSLayoutConstraint.activate([ travelTableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), travelTableView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: .AK.commonHorizontal), travelTableView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -.AK.commonHorizontal), travelTableView.bottomAnchor.constraint(equalTo: view.bottomAnchor) ])
(μ€ν λ μ΄μμ κ³ λ―Ό μ)
μμ νμ΄νμ΄ λΆλͺ¨Viewλ‘λΆν° λ¨μ΄μ ΈμΌ ν κ°μΈμ§ TableViewλ‘λΆν° λ¨μ΄μ ΈμΌ ν κ°μΈμ§ κ³ λ―Όν©λλ€. DesignSystem μ οΏ½Spacingμ΄ λ³κ²½λλ©΄ Titleμ μμΉλν μμ°μ€λ½κ² λ³νκΈΈ λ°λΌλ μ§ κ³ λ―Όν΄ λ΄ λλ€. μ μ ν νλ¨ νμ κΈ°μ€μ μ‘κΈ° !
View
TableView
οΏ½Spacing
Title
extension UIColor { enum AkColorType: String { case white = "#FFFFFF" case gray1 = "#F1F1F1" case gray2 = "#B3B3B3" case gray3 = "#8E8E93" case black = "#000000" case akOrange = "#F64E05" case akGreen = "#DCED59" case akPurple = "#EFD0F4" case akSubGreen = "#E3F4DC" case akRed = "#FFD8D6" case akYellow = "#FFF4CA" case akBlue = "#D0E0F4" } static func akColor(_ type: AkColorType) -> UIColor { return UIColor(hexCode: type.rawValue) } }
μμ λ©μλλ₯Ό μ¬μ©νμ¬ μμμ μ νλλ€. μ λ μΏ ν€λ€ μλΉμ€μ λͺ¨λ νλ©΄μ μμ μμ λΆλ₯λ§ μ¬μ©ν©λλ€. μμμ΄ μΆκ°λλ€λ©΄ caseλ₯Ό μΆκ°ν©λλ€.
μμ
let titleLabel = UILabel().set { $0l.font = .akFont(.gmarketMedium30) $0.textColor = .akColor(.black) $0.adjustsFontForContentSizeCategory = true }
μμ κ°μ View μ μ₯μμ± μμ± μ set λ©μλλ₯Ό μ¬μ©ν©λλ€ [Tip] set λ©μλ μ¬μ© μ $0..translatesAutoresizingMaskIntoConstraints = false λ μλμΌλ‘ μ μ© λ©λλ€
set
$0..translatesAutoresizingMaskIntoConstraints = false
extension UIFont { static func akFont(_ type: AKFontType, dynamic: Bool = true) -> UIFont { guard let customFont = UIFont(name: type.customFont, size: type.size) else { return UIFont.systemFont(ofSize: type.size) // ν°νΈκ° μλ κ²½μ° κΈ°λ³Έ μμ€ν ν°νΈλ‘ λ체 } return dynamic ? UIFontMetrics.default.scaledFont(for: customFont) : customFont } }
λ€μ΄λλ―Ήν°νΈλ₯Ό ꡬννκΈ° μν΄, ν°νΈλ₯Ό λ°ννλ acFont λ©μλλ μμ κ°μ΄ μμ±λμμ΅λλ€.
acFont
μλμ κ°μ΄ μ¬μ©νλ©΄ λ©λλ€.
let titleLabel = UILabel().set { $0.font = .akFont(.gmarketMedium30) $0.textColor = .akColor(.black) $0.adjustsFontForContentSizeCategory = true // π¨ }
π¨μ£Όμπ¨ λ€μ΄λλ―Ή ν°νΈμ λμ μΈ μ μ©μ μν΄μλ μΆκ°μ μΌλ‘ μλ μ΅μ (adjustsFontForContentSizeCategory)μ trueλ‘ μ€μ ν΄μΌ ν©λλ€
adjustsFontForContentSizeCategory
true
#17 λ§μ λ μ΄μμ κ΄λ¦¬, λ 립μ νλμ νμλ‘ νλ κ²½μ° ν΄λΉ UIView κ΅¬μ± μ½λλ ViewController λ΄λΆλ‘λΆν° λΆλ¦¬νμ¬ UIViewλ₯Ό μμν νμ (컀μ€ν λ·°)μ μμ±ν©λλ€
ViewController
UIView
The text was updated successfully, but these errors were encountered:
No branches or pull requests
π·οΈ Description
π¨ λμμΈ μμ€ν
Spacing
constraints
μμ± μ λμμΈκ°μ΄λμ μν₯μ λ°λSpacing
μΈμ§ κ³ λ €ν©λλ€.κ³΅ν΅ μμμ λ°λ₯΄λ κ°μ΄λΌλ©΄
DesingSystem
μ λͺ μλ Spacingμ λ°λΌ μμ±νκ³ ,ν΄λΉ κ°μ΄ λ³λλλ©΄ μ±μ λͺ¨λ λ·°κ° λ³λ λ μ μλλ‘ ν©λλ€.
μμ
μμ
tableView
λ ν΄λΉ λ·°μ κ·μλλ κ°λ μ΄ μλ μ°λ¦¬ μ± μλΉμ€μ μΌκ΄μ±μ μν κ°κ²©μ νμλ‘ ν΄ λ³΄μ λλ€.κ·Έλ¬λ μ«μλ₯Ό μ§μ μ λ ₯νλ κ²μ΄ μλ(νλμ½λ©) κΈ°λ³Έ Spacing μ κΈ°μ νμ¬ μΆν λ³λμ λλΉν©λλ€
(μ’μ° κ°κ²©μ 30μΌλ‘ λνλ κ²°μ μ νλ€λ©΄
DesignSystem
λ§ λ³κ²½ν΄μ£Όμ΄λ λκ²)(μ€ν λ μ΄μμ κ³ λ―Ό μ)
μμ νμ΄νμ΄ λΆλͺ¨
View
λ‘λΆν° λ¨μ΄μ ΈμΌ ν κ°μΈμ§TableView
λ‘λΆν° λ¨μ΄μ ΈμΌ ν κ°μΈμ§ κ³ λ―Όν©λλ€.DesignSystem
μοΏ½Spacing
μ΄ λ³κ²½λλ©΄Title
μ μμΉλν μμ°μ€λ½κ² λ³νκΈΈ λ°λΌλ μ§ κ³ λ―Όν΄ λ΄ λλ€.μ μ ν νλ¨ νμ κΈ°μ€μ μ‘κΈ° !
Color
μμ λ©μλλ₯Ό μ¬μ©νμ¬ μμμ μ νλλ€.
μ λ μΏ ν€λ€ μλΉμ€μ λͺ¨λ νλ©΄μ μμ μμ λΆλ₯λ§ μ¬μ©ν©λλ€.
μμμ΄ μΆκ°λλ€λ©΄ caseλ₯Ό μΆκ°ν©λλ€.
μμ
μμ κ°μ
View
μ μ₯μμ± μμ± μset
λ©μλλ₯Ό μ¬μ©ν©λλ€[Tip]
set
λ©μλ μ¬μ© μ$0..translatesAutoresizingMaskIntoConstraints = false
λ μλμΌλ‘ μ μ© λ©λλ€Font
λ€μ΄λλ―Ήν°νΈλ₯Ό ꡬννκΈ° μν΄, ν°νΈλ₯Ό λ°ννλ
acFont
λ©μλλ μμ κ°μ΄ μμ±λμμ΅λλ€.μλμ κ°μ΄ μ¬μ©νλ©΄ λ©λλ€.
μμ
π¨μ£Όμπ¨
λ€μ΄λλ―Ή ν°νΈμ λμ μΈ μ μ©μ μν΄μλ μΆκ°μ μΌλ‘ μλ μ΅μ (
adjustsFontForContentSizeCategory
)μtrue
λ‘ μ€μ ν΄μΌ ν©λλ€μ»€μ€ν λ·° μμ± κ·μΉ
#17
λ§μ λ μ΄μμ κ΄λ¦¬, λ 립μ νλμ νμλ‘ νλ κ²½μ° ν΄λΉ UIView κ΅¬μ± μ½λλ
ViewController
λ΄λΆλ‘λΆν° λΆλ¦¬νμ¬UIView
λ₯Ό μμν νμ (컀μ€ν λ·°)μ μμ±ν©λλ€The text was updated successfully, but these errors were encountered: