Skip to content

#닀크λͺ¨λ“œ Dark ModeΒ #2

Description

@yoogail105

πŸ“Ž 닀크λͺ¨λ“œ Dark Mode


βœ”οΈŽ WWDC19 μ΄λ²€νŠΈμ—μ„œ λ°œν‘œλœ κ²ƒμœΌλ‘œ, iOS13 이상을 μ‚¬μš©ν•˜λŠ” 기기에 μ§€μ›λœλ‹€.
βœ”οΈŽ μ‹œμŠ€ν…œ μ „μ²΄μ μœΌλ‘œ, 그리고 λͺ¨λ“  μ•± λ‚΄μ—μ„œ Dark Modeλ₯Ό μ‚¬μš©ν•  수 μžˆλ‹€.
βœ”οΈŽ Dark Mode ν™”λ©΄μ—μ„œλŠ” 더 μ–΄λ‘μš΄ 색상 νŒ”λ ˆνŠΈλ₯Ό μ‚¬μš©ν•˜κ³ , μ–΄λ‘μš΄ λ°°κ²½μ—μ„œ μ „κ²½ μ½˜ν…μΈ λ“€μ€ 더 κ°•μ‘°λœλ‹€.
βœ”οΈŽ μ„ΈνŒ…μ—μ„œ Dark Modeλ₯Ό μ„ νƒν•˜λ©΄, systemwide levelμ—μ„œ μ„ νƒλ˜λŠ” 것이기 λ•Œλ¬Έμ— λͺ¨λ“  μ•±μ—μ„œ μ μš©λœλ‹€.

πŸ“Ž 닀크λͺ¨λ“œ 컬러 Dark Mode Colors

βœ”οΈŽ Dark Mode의 컬러 νŒ”λ ˆνŠΈλŠ” 더 μ–΄λ‘μš΄ λ°±κ·ΈλΌμš΄λ“œ μ»¬λŸ¬μ™€, 밝은 μ „κ²½ 컬러λ₯Ό ν¬ν•¨ν•œλ‹€.
βœ”οΈŽ λͺ¨λ“œμ™€ μ•± κ°„μ˜ μΌκ΄€λœ λŠλ‚Œμ„ μœ μ§€ν•˜λ©΄μ„œ, λŒ€λΉ„λ₯Ό λ‚˜νƒ€λ‚Ό 수 μžˆλ„λ‘ μ‹ μ€‘ν•˜κ²Œ 선택해야 ν•œλ‹€.
βœ”οΈŽ 배경은 더 μ–΄λ‘μ›Œμ„œ ν›„ν‡΄ν•˜λŠ” 것 같은 λŠλ‚Œ, 전경은 더 λ°μ•„μ„œ λ‚˜μ•„μ˜€λŠ” 것 같은 λŠλ‚Œ
βœ”οΈŽ Dark Modeλ₯Ό μ‚¬μš©ν•  λ•Œ, 색상 값듀을 λ‹€μ‹œ μ§€μ •ν•΄μ•Ό ν•œλ‹€.
βœ”οΈŽ Dark Modeλ₯Ό 지원할 경우, 값이 λ§Žμ•„μ§€λ―€λ‘œ μ»¬λŸ¬λ‚˜ 이미지, μ•„μ΄μ½˜ 등을 λ³„λ„λ‘œ 관리해야 ν•œλ‹€.

πŸ“Ž 의미적 색채 Semantic Colors와 μ‹œμŠ€ν…œ 컬러 System Colors

βœ”οΈŽ 의미λ₯Ό κ°€μ§„ 색
βœ”οΈŽ 컬러λ₯Ό Hex값이 μ•„λ‹ˆλΌ, μ»¬λŸ¬κ°€ μ‚¬μš©λ˜λŠ” λͺ©μ κ³Ό μ μš©λ˜λŠ” UI에 따라 λ„€μ΄λ°ν•˜κ³  μ‹œμŠ€ν…œν™” ν•˜λŠ” 것을 의미
βœ”οΈŽ Custom λŒ€μ‘μ„ μœ„ν•΄μ„œ Asset Catalog μ‚¬μš© κ°€λŠ₯
βœ”οΈŽ Dynamic Colors: Semantic ColorsλŠ” μ μš©ν•˜λ©΄ μžλ™μ μœΌλ‘œ λͺ¨λ“œμ— 따라 색상이 바뀐닀.
βœ”οΈŽ .label .systemBackground .systemBlue λ“±
βœ”οΈŽ iOS 13 μ΄μƒμ—μ„œλ§Œ μ‚¬μš© κ°€λŠ₯ν•˜λ‹€!

‼️ ios12 μ΄ν•˜ 버전은?

if #available(iOS 13, *) {
    topicLabel.textColor = .label
		dynamicRedColor.textColor = .systemRed
} else {
    topicLabel.textColor = .black
    dynamicRedColor.textColor = .red
}

πŸ“Ž 닀크λͺ¨λ“œ 없이 κ°œλ°œν•˜λŠ” 방법

Info -> Information Property List -> '+'λ²„νŠΌ -> Appearance: Light

πŸ–‡ μ°Έκ³ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions