1SPpMF
struct Profile {
let name = "Kazuya Ueoka"
let twitter = "@fromkk"
let github = "fromkk"
let qiita = "fromkk"
let company = "Timers Inc."
}
•
2
Slide 3
Slide 3 text
%BSLNPEF ❓
Slide 4
Slide 4 text
%BSLNPEF
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
)PXUPJNQMFNFOUT
Slide 7
Slide 7 text
04͕༻ҙͨ͠৭Λར༻
open class var systemIndigo: UIColor { get }
open class var systemGray2: UIColor { get }
open class var systemGray3: UIColor { get }
open class var systemGray4: UIColor { get }
open class var systemGray5: UIColor { get }
open class var systemGray6: UIColor { get }
open class var label: UIColor { get }
open class var secondaryLabel: UIColor { get }
open class var tertiaryLabel: UIColor { get }
open class var quaternaryLabel: UIColor { get }
open class var link: UIColor { get }
open class var placeholderText: UIColor { get }
open class var separator: UIColor { get }
open class var opaqueSeparator: UIColor { get }
open class var systemBackground: UIColor { get }
open class var secondarySystemBackground: UIColor { get }
open class var tertiarySystemBackground: UIColor { get }
open class var systemGroupedBackground: UIColor { get }
open class var secondarySystemGroupedBackground: UIColor { get }
open class var tertiarySystemGroupedBackground: UIColor { get }
open class var systemFill: UIColor { get }
open class var secondarySystemFill: UIColor { get }
open class var tertiarySystemFill: UIColor { get }
open class var quaternarySystemFill: UIColor { get }
˞J04Ͱ૿͑ͨ৭ͷҰཡͳͷͰશ͕ͯ%BSLNPEFରԠ͔Ͳ͏͔֬ೝ͍ͯ͠·ͤΜ
Slide 8
Slide 8 text
"TTFUT
w $PMPS*NBHFBTTFUTʹ%BSL
"QQFBSBODF͕Ճ /%"ʹྀͷҝࣗॗ
Slide 9
Slide 9 text
*#্Ͱը૾ͷ৭มߋ
w *NBHF"TTFUͷ3FOEFS"TΛ5FNQMBUF
*NBHFʹઃఆ
w *#ଆͰը૾ͷ5JOUDPMPSΛઃఆ
5JQT
Slide 10
Slide 10 text
*NQMFNFOUTXJUIDPEF
w USBJU$PMMFDUJPOͷVTFS*OUFSGBDF4UZMFϓϩύςΟΛར༻
public enum UIUserInterfaceStyle : Int {
case unspecified
case light
case dark
}
w ΧελϜ%ZOBNJD$PMPSΛ࡞
let dynamicColor = UIColor { traitCollection -> UIColor in
switch traitCollection.userInterfaceStyle {
case .dark:
return .red
default:
return .blue
}
}
etc…
Slide 11
Slide 11 text
*NQMFNFOUTXJUIDPEF
w ໌ࣔతʹϋϯυϦϯά
let dynamicColor = UIColor.systemBackground
let traitCollection = view.traitCollection
let resolvedColor = dynamicColor.resolvedColor(with: traitCollection)
let resolvedImage = image.imageAsset?.image(with: traitCollection)
w ΠϕϯτϋϯυϦϯά
*NQMFNFOUJOH%BSL.PEFPOJ04
ΑΓҾ༻
Slide 12
Slide 12 text
%BSLNPEFͷมߋํ๏
var overrideUserInterfaceStyle: UIUserInterfaceStyle
ը໘ຖʹઃఆ
6*7JFX
6*7JFX$POUSPMMFS
UIUserInterfaceStyle: Light or Dark
ΞϓϦશମΛઃఆ
*OGPQMJTU
Slide 13
Slide 13 text
ҙࣄ߲
w 6*"DUJWJUZ*OEJDBUPS4UZMFͷHSBZXIJUFXIJUF-BSHF͕EFQSFDBUFE
NFEJVNͱMBSHF͕৽ઃ ৭DPMPSϓϩύςΟʹઃఆग़དྷΔ
w 6*4UBUVT#BSεΫϩʔϧόʔͷ৭͕ϞʔυʹΑͬͯมߋ͞ΕΔࣄ͕͋Δ
w Ө͕͑ͳ͍ ͱ͍͏͔ҙຯΛͳ͞ͳ͍
ͷͰ৭ͰϨΠϠʔΛදݱ͢Δඞཁ
͕͋Δ