Slide 1

Slide 1 text

@S_Shimotori େղ๤ʂUIColorϑΝϛϦʔ iOSDC Japan 2020

Slide 2

Slide 2 text

͠΋ͱΓ • @S_Shimotori_pub • iOSΉ͔͍ͣ͠ 2

Slide 3

Slide 3 text

UIColor ϑΝϛϦʔ ??? 3

Slide 4

Slide 4 text

UIColorͱαϒΫϥεͨͪ 4

Slide 5

Slide 5 text

UIColor͸େՈ଒ͩͬͨʂ UIColor 5

Slide 6

Slide 6 text

ࠓճ࿩͢ωλ • UIColorʹ͸αϒΫϥε͕͍ͬͺ͍ʂ • αϒΫϥε঺հ • UIColorͷαϒΫϥεࣗ࡞͸݁ߏ೉͍͠ɻ • UIColorͷϝιουͷڍಈΛݟΔ 6

Slide 7

Slide 7 text

UIColorʹ͸ αϒΫϥε͕͍ͬͺ͍ʂ 7

Slide 8

Slide 8 text

͔ΜͨΜver. private 8

Slide 9

Slide 9 text

αϒΫϥε͕͍ͬͺ͍͋Δཧ༝ UIColor͸ͱͯ΋ෳࡶ͔ͩΒ 9

Slide 10

Slide 10 text

UIColor var red: CGFloat var green: CGFloat var blue: CGFloat ม׵? init(white:alpha:) init(cgColor:) ❌ 10

Slide 11

Slide 11 text

ͲͷΑ͏ʹ৭σʔλΛอ࣋͢Δ͔ʁ • ͋ΒΏΔ৭σʔλΛಉ͡ܗࣜͰอ࣋͢Δͷ͸ແཧͦ͏ • UIImageΛίϯϙʔωϯτ஋ʹม׵͸ແཧ • ৭ۭؒΛἧ͑Α͏ͱͯ͠ແҋʹม׵ͨ͠Βѻ͍ʹͦ͘͏ • dynamic colorͷ৔߹͸traitʹԠͯࣗ͡༝ʹมΘΔ ৭Λܾఆ͢ΔͨΊͷσʔλΛͦͷ··͓͔࣋ͬͯ͘͠ͳ͍ʂ 11

Slide 12

Slide 12 text

΋͠UIColor͕୯ମͰଘࡏ͍ͯͨ͠Β(1/2) class UIColor { private let redComponent: CGFloat? private let greenComponent: CGFloat? private let blueComponent: CGFloat? private let whiteComponent: CGFloat? private let alphaComponent: CGFloat? private let provider: ((UITraitCollection) -> UIColor)? private let image: UIImage? 以下略 12

Slide 13

Slide 13 text

΋͠UIColor͕୯ମͰଘࡏ͍ͯͨ͠Β(2/2) func withAlphaComponent() -> UIColor { if /*RGBで表現されているとき*/ { } else if /*色空間がdisplay P3のとき*/ { } else if /*パターンイメージを使うとき*/ { } else if /*dynamic colorのとき*/ { 以下略 13

Slide 14

Slide 14 text

UIColorͷ࠾ͬͨղܾࡦ σβΠϯύλʔϯɿClass Cluster ʢAbstract Factoryͷ೿ੜʣ 14

Slide 15

Slide 15 text

σβΠϯύλʔϯͷ؍఺͔Β ←ந৅Ϋϥεɹ݉ɹΠϯελϯεͷੜ੒܎ 18ݸͷαϒΫϥεͦΕͧΕͰ
 18௨Γͷ۩ମతͳॲཧΛ࣮૷ 15

Slide 16

Slide 16 text

Class Clusterͷ͕͍͜͜͢͝ʂ • ΫϥεΛ࢖͏ଆ͸಺෦࣮૷Λؾʹ͠ͳͯ͘Α͍ • εʔύʔΫϥεUIColor͚ͩ஌͍ͬͯΕ͹े෼ • αϒΫϥε͕ෳࡶͳ࣮૷Λ෼୲ͯ͘͠ΕΔ • ྫɿRGB୲౰ɺύλʔϯΠϝʔδ୲౰ɺAsset Catalog୲౰etc… 16

Slide 17

Slide 17 text

࣮ࡍͷUIColor͸͜Μͳײ͡ʁ UIColor public init(red: CGFloat, ..., alpha: CGFloat) { return UIDeviceRGBColor() } public init(patternImage: CGFloat) { return UIDynamicPatternColor() } var cgColor: CGColor { get } UIDeviceRGBColor UIDynamicPatternColor let redComponent: CGFloat override var cgColor: CGColor { /*適切な処理*/ } let image: UIImage override var cgColor: CGColor { /*適切な処理*/ } RGB୲౰ ύλʔϯΠϝʔδ୲౰ 17 ஫ɿਖ਼֬Ͱ͸͋Γ·ͤΜ

Slide 18

Slide 18 text

৭ͷܾఆํ๏͕͍ͬͺ͍ʂ • init(white:alpha:) • init(red:green:blue:alpha:) / init(hue:saturation:brightness:alpha:) • init(displayP3Red:green:blue:alpha:) • init(named:) / init(named:in:compatibleWith:) • init(dynamicProvider:) • init(ciColor:) • init(cgColor:) • init(patternImage:) • init(_:) ※SwiftUI.ColorɻiOS14.0ʙ શ෦ҧ͏αϒΫϥε͕ฦͬͯ͘Δ ʢ΋ͪΖΜݟ͔͚͸public class UIColorʣ 18 గਖ਼ʢ2020/09/20ʣ
 init(_:)͸طଘͷΫϥεΛฦ͢໛༷ɻ

Slide 19

Slide 19 text

UIColorͷαϒΫϥε͸΋ͬͱ͍ͬͺ͍ʂ • ΠχγϟϥΠβ͕8छ10ݸʢiOS13.6࣌఺ʣ • init()΋ೖΕͨΒ9छ11ݸ • αϒΫϥε͕18ݸʢiOS13.6࣌఺ʣ iOS14Ͱ͸init(_:)͕૿͑ͯΔͷͰɺΠχγϟϥΠβ͕10छ12ݸɺαϒΫϥε͕19ݸʹͳ͍ͬͯΔ͔΋͠Εͳ͍ɻ 19 గਖ਼ʢ2020/09/20ʣ
 init(_:)͸طଘͷΫϥεΛฦ͢໛༷ɻ૿͑ͯͳ͍Έ͍ͨͰ͢ɻ

Slide 20

Slide 20 text

αϒΫϥε঺հ 20

Slide 21

Slide 21 text

ͦͷલʹɿUIColorͷཪଆΛ࡯͢Δखஈ • class-dump • Objective CͷϔομΛ೷͚Δπʔϧ • Method swizzlingɺXcodeͷSymbolic Breakpoint • ಛఆͷϝιου͕ݺ͹ΕͨॠؒΛั·͑Δ • ԿΛ͍ͯ͠Δ͔΋ͪΐͬͱΘ͔Δ • object_getClass(_:) • ܕ໊ͷऔಘ • type(of:)ͩͱ͏·͘औΕͳ͍ 21

Slide 22

Slide 22 text

class-dumpͰ೷͍ͯΈͨ UIKitCore.framework/UIDeviceRGBColor.hʢҰ෦ൈਮʣ #import __attribute__((visibility("hidden"))) @interface UIDeviceRGBColor : UIColor { double redComponent; double greenComponent; double blueComponent; double alphaComponent; struct CGColor *_cachedColor; } - (_Bool)getWhite:(double *)arg1 alpha:(double *)arg2; Copyright (C) 1997-2019 Steve Nygard. 22

Slide 23

Slide 23 text

αϒΫϥεΛछྨ෼͚͢Δͱ͜Μͳײ͡ 
 dynamic color 
 ίϯϙʔωϯτ஋Ͱ
 ৭Λܾఆ ଞFrameworkͱͷ࿈ܞ ϓϨʔεϗϧμʔ 23

Slide 24

Slide 24 text

1. UIPlaceholderColor • init()ͰಘΒΕΔΫϥε • init()Ͱ͑͞UIColorΛฦ͞ͳ͍ • Կ͔ಛఆͷ৭Λࢦ͍ͯ͠ΔΘ͚Ͱ͸ͳ͍ 24

Slide 25

Slide 25 text

Nextɿίϯϙʔωϯτ஋Λѻ͏αϒΫϥε 
 ίϯϙʔωϯτ஋Ͱ
 ৭Λܾఆ 25

Slide 26

Slide 26 text

2-3. UI(Cached)DeviceRGBColor • RGBͰࢦఆ͞ΕΔ৭ͷͨΊͷΫϥε • RGBAίϯϙʔωϯτ஋Λड͚औΓɺอ͓࣋ͯ͘͠ • init(red:green:blue:alpha:)Ͱ࡞ͬͨͱ͖͸UIDeviceRGBColor • init(hue:saturation:brightness:alpha:)΋͜Ε • UIColor.red΍UIColor.green͸UICachedDeviceRGBColor • Apple͕༻ҙͯ͘͠ΕͨRGBͷ৭ͷ͏ͪɺstatic colorͰ͋Δ΋ͷ 26

Slide 27

Slide 27 text

CachedͳΫϥεͱ͸ • ͦͷ໊ͷ௨Γɺ࢖͍ճͨ͢ΊͷΫϥε • ࢀরΧ΢ϯτ΍copyͷ͋ͨΓΛௐ੔͍ͯ͠ΔΈ͍ͨ • ྫɿUIColor.blue΍UIColor.white • Ұ෦ͷαϒΫϥεͷΈ͕αϒΫϥεUICached???ColorΛ࣋ͭ 27

Slide 28

Slide 28 text

4-5. UI(Cached)DeviceWhiteColor • άϨʔεέʔϧͳ৭͸ͬͪ͜ • WhiteͱAlphaͷ஋Λड͚औΓɺอ͓࣋ͯ͘͠ • init(white:alpha:)ͳΒUIDeviceWhiteColor • UIColor.white΍UIColor.clearͳΒUICachedDeviceWhiteColor 28

Slide 29

Slide 29 text

6. UIDisplayP3Color • init(displayP3Red:green:blue:alpha:)ͰಘΒΕΔ • ৭ۭ͕ؒdisplay P3ͳ৭͸͜Ε 29

Slide 30

Slide 30 text

Nextɿdynamic color 
 dynamic color 30

Slide 31

Slide 31 text

7. UIDynamicColor • dynamic colorͷ௖఺ • iOSʹ͓͍ͯdynamicͱ͸ʮtraitͷมԽʹԠͯ͡ಈతʹมΘΔʯͱ͍͏͜ͱ • var _isDynamic: Bool { get } ͕ਅ • ͜Ε͕ਅͳΒ͹traitͷมԽʹ௥ै͢ΔΒ͍͠ 31

Slide 32

Slide 32 text

8. UIDynamicSystemColor • Standard Colorͷ͏ͪɺdynamic colorͰ͋Δ΋ͷ • UIColor.systemBlue΍UIColor.systemBackgroundͳͲ 32

Slide 33

Slide 33 text

9. UIDynamicCatalogColor • Asset Catalog init(named:) ͔ΒಘΒΕΔ • 1ͭͰ΋Dark ModeରԠͷ৭Λ࡞ͬͯ͋Δͱશͯͷ৭͕͜ͷΫϥεͰදݱ͞ΕΔ
 ʢstatic color͔͠ͳ͍৔߹͸static color༻ͷΫϥεΛ࢖͍෼͚Δʣ 33

Slide 34

Slide 34 text

10. UIDynamicPatternColor • init(patternImage:)ͰಘΒΕΔΫϥε • ಺෦ʹUIImageΛ࣋ͭ • traitͷมԽʹԠͯ͡UIImage಺ͷը૾Λ࢖͍෼͚Δ 34

Slide 35

Slide 35 text

11. UIDynamicProviderColor • init(dynamicProvider:)ͰಘΒΕΔ • ༩͑ͨproviderϒϩοΫΛอ͍࣋ͯ͠Δ 35

Slide 36

Slide 36 text

12. UIDynamicAppDefinedColor • ରԠ͢ΔΠχγϟϥΠβ͸ͳ͠ • ྫ͑͹UIDynamicProviderColorΛarchive & unarchive͢Δͱ͜ͷܕʹͳΔ • [UITraitCollection: UIColor] ͷ͔ͨͪͰه࿥͢Δ • ଞʹ΋ಇ͍͍ͯΔͱ͜Ζ͕͋ͬͨΒڭ͍͑ͯͩ͘͞ 36

Slide 37

Slide 37 text

13. UIDynamicModifiedColor • ରԠ͢ΔΠχγϟϥΠβ͸ͳ͠ • ಺෦ʹUIDynamicColorΛ1ͭɺalpha componentΛ1ͭ࣋ͭ • ޙड़ 37

Slide 38

Slide 38 text

NextɿଞͷFrameworkͱ࿈ܞ͢ΔαϒΫϥε ଞFrameworkͱͷ࿈ܞ 38

Slide 39

Slide 39 text

14. UICIColor • init(ciColor:)ͰಘΒΕΔΫϥε • CIColorΛड͚औͬͯอ࣋͢Δ͔ΒUICIColor • CI = CoreImage.framework • ड͚औͬͨCIColorΛ಺෦ʹӅ͍࣋ͬͯ͠Δ • var ciColor: CIColor { get } ͸ͦͷ··ฦ͚ͩ͢ͷॲཧΛ͍ͯ͠ΔΈ͍ͨ 39

Slide 40

Slide 40 text

15. UICGColor • init(cgColor:)ͰಘΒΕΔΫϥε • ಺෦ʹCGColorΛӅ͍࣋ͬͯ͠Δ • var cgColor: CGColor { get } ͸ͦͷ··ฦ͚ͩ͢ • UICGColor͸αϒΫϥεΛ࣋ͭ 40

Slide 41

Slide 41 text

16-17. UI(Cached)PatternCGColor • init(cgColor:)ͰಘΒΕΔΫϥεͦͷ2 • PatternͳCGColorͷͨΊͷΫϥε • ڪΒ͘ var pattern: CGPattern? { get } Λ͍࣋ͬͯΔΑ͏ͳCGColor • खͬऔΓૣ͍ྫɿUIColor.init(cgColor: UIColor.init(patternImage: image).cgColor) • CachedΫϥεΛ࣋ͭʢUICachedPatternCGColorʣ 41

Slide 42

Slide 42 text

UIPatternCGColorΛ࡞Δ let drawPattern: CGPatternDrawPatternCallback = { info, context in let subunit = CGFloat(20.0) context.setFillColor(red: 0.5, green: 0, blue: 0, alpha: 1) context.fill(CGRect(x: 0, y: 0, width: subunit, height: subunit)) context.setFillColor(red: 1, green: 0.3, blue: 0.3, alpha: 1) context.fill(CGRect(x: subunit, y: subunit, width: subunit, height: subunit)) context.setFillColor(red: 0.7, green: 0.3, blue: 0, alpha: 1) context.fill(CGRect(x: 0, y: subunit, width: subunit, height: subunit)) context.setFillColor(red: 0.7, green: 0.3, blue: 0, alpha: 1) context.fill(CGRect(x: subunit, y: 0, width: subunit, height: subunit)) } var callbacks = CGPatternCallbacks(version: 0, drawPattern: drawPattern, releaseInfo: nil) let pattern = CGPattern(info: nil, bounds: CGRect(x: 0, y: 0, width: 1, height: 1), matrix: CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0), xStep: 40, yStep: 40, tiling: .constantSpacing, isColored: true, callbacks: &callbacks)! let color = UIColor(cgColor: CGColor(patternSpace: CGColorSpace(patternBaseSpace: nil)!, pattern: pattern, components: [1, 1, 1, 1])!) ਺ࣈ͸ద౰Ͱ͢ 42

Slide 43

Slide 43 text

UICachedPatternCGColorΛ୳͍ͯ͠·͢ ಇ͍͍ͯΔͱ͜ΖΛݟ͔͚ͨํ͸@S_Shimotori_pub·Ͱʂ UICached
 PatternCGColor ※ಛʹँྱ͸ͳ͍Ͱ͢ 43

Slide 44

Slide 44 text

18. NSColor • UIKit.NSColor.init(coder:)ʹΑΓCocoa.NSColorΛunarchiveͰ͖Δ • UIColorΛσίʔυ͢Δͱ͖͸ݺ͹Εͳ͍Έ͍ͨ • ࣮ࡍʹฦͬͯ͘Δͷ͸UIDeviceRGBColor΍UIDeviceWhiteColor • ଞʹ΋Ӆ͠ػೳ͕͋ͬͨΒڭ͍͑ͯͩ͘͞ • ͍ͯ͏͔ͳΜͰNSColor͕ཁΔΜͰ͠ΐ͏…ʁ 44

Slide 45

Slide 45 text

DataܕΛհͯ͠৭σʔλΛ෮ݩͰ͖ͪΌͬͨ Cocoa.NSColor→Data→UIColor let color = Cocoa.NSColor(calibratedWhite: 0.5, alpha: 0.5) let colorData = try! NSKeyedArchiver.archivedData( withRootObject: color, requiringSecureCoding: true ) try! colorData.write(to: URL(fileURLWithPath: 略)) let data = try! Data(contentsOf: URL(fileURLWithPath: 略)) let color = try! NSKeyedUnarchiver.unarchivedObject( ofClasses: [UIColor.self], from: data ) // ここでUIKit.NSColor.init(coder:)が呼ばれる print(color) // Optional(UIExtendedGrayColorSpace 0.5 0.5) 45

Slide 46

Slide 46 text

UIColorͱαϒΫϥεͨͪʢ࠶ܝʣ 46

Slide 47

Slide 47 text

UIColorͷαϒΫϥεࣗ࡞͸ ݁ߏ೉͍͠ɻ 47

Slide 48

Slide 48 text

UIColorͷαϒΫϥεΛࣗ࡞͢Δͱ͸ 48

Slide 49

Slide 49 text

• ·ͣ͸αϒΫϥεΛ࡞Δ • ϓϩύςΟ΍ϝιουΛܧঝͯ͠ઐ༻ͷॲཧΛ࣮૷͓ͯ͘͠ ྫ͑͹͜Μͳײ͡ (1/2) @implementation MyColor: UIColor - (instancetype _Nonnull)initWithMyProperty:略 { 略 return self; } - (CGColorRef)CGColor { // 必要なプロパティやメソッドを継承 return 略; } 略 @end 49

Slide 50

Slide 50 text

• UIColorʹ࡞੒༻ͷΠχγϟϥΠβΛ࣋ͨͤΔ • privateͳαϒΫϥεͷΠϯελϯεΛ࡞੒͢ΔखஈΛ༻ҙ͢Δ ྫ͑͹͜Μͳײ͡ (2/2) @implementation UIColor(MyColor) // UIColorにイニシャライザを持たせる - (UIColor * _Nonnull)initWithMyProperty:略 { return [[MyColor alloc] initWithMyProperty:略]; } @end 50

Slide 51

Slide 51 text

ޙ෇͚ͰαϒΫϥεΛ࡞੒͢Δ৔߹ͷ೉қ౓ • UIColor௚Լʹ࡞Δɿ؆୯ͳ΋ͷͳΒOK • ܧঝΛ๨Εͨϝιου΍ϓϩύςΟ͕͋Δͱ࠷ѱΫϥογϡ͢ΔͷͰ஫ҙ • SwiftͰͷ࣮૷͸ແཧʢHAKATA.swiftͰͷൃදΛݟͯͶʣ • privateͳαϒΫϥεͷԼʹ͚ͭΔɿແཧ • खग़͠Ͱ͖ͳ͍ • dynamic color΍pattern colorΛ࡞Δɿ࣮࣭ແཧ • ϓϩύςΟ͕privateͳͷͰ͍͡ΔͱౖΒΕͦ͏ 51

Slide 52

Slide 52 text

dynamic colorΛ࡞Δ৔߹ • ࢓ํ͕ͳ͍ͷͰUIColorΛ௚઀ܧঝ͢Δ • isDynamicΛਅʹͯ͠ɺtrait͕มԽͨ͠ͱ͖ʹ࠶ܭࢉͯ͠΋Β͏ • ͪΌΜͱಈ͔͘͸஌Γ·ͤΜ - (BOOL)_isDynamic { return YES; } 52

Slide 53

Slide 53 text

ৄ͘͠͸ • ୈ13ճHAKATA.swiftʮUIColor ClusterʯͷࢿྉΛݟͯͶ • σβΠϯύλʔϯ΍Swiftͷ࢓༷ʹॏ఺Λஔ͍ͯઆ໌͍ͯ͠·͢ • @S_Shimotori_pub Ѽʹ࣭໰Λ౤͍͛ͯͩ͘͞ 53

Slide 54

Slide 54 text

UIColorͷϝιουͷڍಈΛݟΔ 54

Slide 55

Slide 55 text

αϒΫϥεʹࢧ͑ΒΕͨϝιου&ϓϩύςΟ • withAlphaComponent(_:) • resolvedColor(with:) • cgColor, ciColor • set(), setFill(), setStroke() • getHue(ུ) / getRed(ུ) / getWhite(ུ) • isEqual(to:) ⚠αϒΫϥε͝ͱʹಈ࡞͕ҟͳΔ͔΋⚠ 55

Slide 56

Slide 56 text

withAlphaComponent(_:) • UIPlaceholderColor͸ಛఆͷ৭Λࢦ͍ͯ͠ͳ͍ͷͰΫϥογϡ • static colorͰ͸୯७ʹalpha componentΛ্ॻ͖͢Ε͹OK • ݩͱಉ͡Ϋϥε͕໭Γ஋ͱͯ͠ฦ͞ΕΔ • alpha componentҎ֎͸มߋ͞Εͳ͍ • dynamic color͸ղܾͷͨͼʹalpha componentΛ্ॻ͖͢Δඞཁ͕͋Δ • ͭ·ΓUIDynamicModifiedColor͕ཁΔ • ͜ͷϝιουΛ࣮ߦͯ͠΋ݩͷUIDynamicColor͸ҡ࣋͞ΕΔ 56

Slide 57

Slide 57 text

cgColorɺ resolvedColor(with:) ৭ͷղܾ • UIPlaceholderColor͸ಛఆͷ৭Λࢦ͍ͯ͠ͳ͍ͷͰΫϥογϡ • dynamic colorʹͱͬͯ͸ಛఆͷҰ৭ʹܾఆ͢Δૢ࡞ • cgColor͸UITraitCollection.currentΛ࢖͍ͬͯΔΑ͏ʹݟ͑Δ • ྫ: layer.borderColor = dynamicColor.cgColor ͸࠷ॳ͚ͩਖ਼͍͠৭Ͱදࣔ͞ΕΔ • resolvedColor(with:)Ͱ͋Ε͹༩͑ͨUITraitCollectionͰ 57

Slide 58

Slide 58 text

isEqual(to:) • UIPlaceholderColor͸ಛఆͷ৭Λࢦ͍ͯ͠ͳ͍ͷͰΫϥογϡ • ಉ͡αϒΫϥεͰɺϓϩύςΟ͕౳஋ͳΒਅʁ • ྫɿUIColor.whiteͱUIColor(white: 1, alpha: 1)͸ਅ • ྫɿUIColor(red: 1, green: 1, blue: 1, alpha: 1)ͱUIColor(white: 1, alpha: 1)͸ِ • UICIColorͱUICGColorͱͷ൑ఆ͸ِʹͳΔ • UIDynamicProviderColor͸ಉҰੑ൑ఆ͕ਅͰͳ͚Ε͹౳஋൑ఆ΋ਅʹͳΒͳ͍ • UIDynamicAppDefinedColorʹ͢Ε͹౳஋൑ఆ͕ਅʹͳΕΔ 58

Slide 59

Slide 59 text

ͪΐͬͱ໾ʹཱ͔ͭ΋͠Εͳ͍tips • XCTAssertEqualͰUIColorΛςετ͢Δͱ͖͸ɺಉ͡αϒΫϥεͰ൑ఆ͠Α͏ • ҧ͏αϒΫϥεಉ࢜Ͱ͸equalʹͳΒͳ͍ͷͰςετ͕௨Βͳ͍ ❌ UIDeviceRGBColorͷനͱUICachedDeviceWhiteColorͷന XCTAssertEqual(UIColor(red: 1, green: 1, blue: 1, alpha: 1), UIColor.white) ✅ UI(Cached)DeviceWhiteColorಉ࢜ XCTAssertEqual(UIColor(white: 1, alpha: 1), UIColor.white) 59

Slide 60

Slide 60 text

·ͱΊ 60

Slide 61

Slide 61 text

UIColorͱ͸ • ৭ͷ༷ʑͳࢦఆํ๏Λαϙʔτ͢ΔͨΊɺࢥͬͨҎ্ʹෳࡶ • ෳࡶͳͭ͘ΓΛ͍ͯ͠Δ͚ͩͷཧ༝͕͋Δ • ࢲͨͪ͸UIColor͑͞஌͍ͬͯΕ͹OK • ࡉ͔͍͜ͱ͕ؾʹͳͬͨΒࢥ͍ग़͍ͯͩ͘͠͞ 61

Slide 62

Slide 62 text

ࢀߟจݙͳͲ 62

Slide 63

Slide 63 text

ࢀߟจݙͱ͔໘നͦ͏ͳϖʔδͱ͔ • Randomizing UIColor with Method Swizzling | Jonathan Cole • ʲIOS ARCʳ UIColor͕ϝϞϦʹ࢒͍ͬͯΔΑ͏ͳؾ͕͢Δ – ඥ෇͚ͳ೔ʑ • Patterns • Core Graphics Tutorial: Patterns | raywenderlich.com • iOS ൌགྷapp∍ന໛ࣜ - ࡥ඀ • nygard/class-dump: Generate Objective-C headers from Mach-O files. • nst/RuntimeBrowser: Objective-C Runtime Browser, for Mac OS X and iOS 63

Slide 64

Slide 64 text

ૉࡐ • ͔Θ͍͍ϑϦʔૉࡐू ͍Β͢ͱ΍ • ;͖ͩ͠ૉࡐઐ໳αΠτʮϑΩμγσβΠϯʯ – Just another WordPress site 64