Slide 1

Slide 1 text

Layout Debug with Reveal.app

Slide 2

Slide 2 text

Profile • Ӊࠤݟ ެี • ϑΣϯϦϧגࣜձࣾ • iOS ΞϓϦ։ൃ

Slide 3

Slide 3 text

REVEAL (http://revealapp.com/)

Slide 4

Slide 4 text

Layout Debug for iOS

Slide 5

Slide 5 text

Xcode ͱͷҧ͍ • Reveal ͸ break ͠ͳͯ͘΋ϨΠΞ΢τ֬ೝͰ͖Δ • Live Edit : Reveal ͸ͦͷ৔Ͱ஋ʢframe ΍ color ͳ ͲʣΛॻ͖׵͑Δ͜ͱ͕Ͱ͖Δ

Slide 6

Slide 6 text

For Auto Layout

Slide 7

Slide 7 text

Auto Layout inspection

Slide 8

Slide 8 text

Auto Layout ͷ Live Edit • ֤ Constraint ʹରͯ͠ɾɾɾ • Constant ஋ͷมߋ • Active / NonActive ੾Γସ͑ • ίʔυͰͰ͖Δ͜ͱͱಉ͡

Slide 9

Slide 9 text

ྫ • σβΠφʔ͞Μ͔ΒͷϨΠΞ΢τࢦࣔͩͱ iPhone 4S Ͱݟ੾ ΕΔ • Α͋͘Δɻ • σβΠφʔ͞Μ͸ iPhone 4S ͷදࣔʹͩ͜ΘΓ͕ͳ͍ • ๻ʮ͡Ό͋ͬͪ͜ͰϚʔδϯͱ͔ௐ੔͠·͢Ͷʯ

Slide 10

Slide 10 text

ʢ༨ஊʣ • σβΠφʔ͞Μ͸ iPhone 4S Λ੾Γ͍ͨͱΑ͘ݴ͏ • ͏ΜɺΘ͔Δɻ • ͨͩɺiPad ͷ iPhone ޓ׵දࣔ΋ಉ͡ॎԣൺ • iPad ͰϘλϯ͕͸Έग़ͯԡͤͳ͍ → ϦδΣΫτ

Slide 11

Slide 11 text

ௐ੔ • iPhone 4S + Reveal Ͱ໨తͷը໘Λදࣔ • Ϛʔδϯͷ Constant Λมߋͯ͠ྑͦ͞͏ͳ஋Λ୳͢ • ͜ͷ࡞ۀ͕ Reveal ͩͱΘΓͱָͰྑ͍

Slide 12

Slide 12 text

࣮૷ • ྫ : Ϛʔδϯ͕௨ৗ 30 pt / 4S ͚ͩ 15 pt • Ϛʔδϯ >= 15 pt ͷ੍໿Λ͚ͭΔ • Ϛʔδϯ == 30 pt ͷ੍໿Λ͚ͭΔʢ༏ઌ౓Լ͛Δʣ • Ͱ͖ͨΒ Reveal Ͱ࠶֬ೝ

Slide 13

Slide 13 text

ิ଍ • 4S ޲͚ʹΨνΨνͷ஋Λࢦఆ͢Δͱ͍͏ͷ͸ͳΜ͔ҧ ͏ɾɾɾ • ࣮ࡍͷͪΐ͏Ͳͷ஋ΑΓগ͠؇Ίͷ੍໿ʹͨ͠΄͏͕ਫ਼ਆతʹ མͪண͘ • ʮ͜͜͸࠷௿ݶ͜Ε͚ͩͷεϖʔε͕ͳ͍ͱϨΠΞ΢τతʹ͓ ͔͍͠ʯͱ͍͏෩ʹɺҙຯతʹͭͭ͡·͕߹͏Α͏ͳ੍໿ʹ͢ Δ

Slide 14

Slide 14 text

Tips : Reveal ಋೖ

Slide 15

Slide 15 text

Tips : Reveal ಋೖ • Reveal Λ࢖͏ʹ͸ɺiOS ΞϓϦʹ Reveal ϥΠϒϥϦΛϦ ϯΫ͢Δඞཁ͕͋ΔʢCocoaPods Λར༻Ͱ͖Δʣ • LLDB Ͱϩʔυ : Integrating Reveal without modifying your Xcode project - Itty Bitty Labs

Slide 16

Slide 16 text

iOS γϛϡϨʔλͷ৔߹ • ࣄલʹϦϯΫͯ͠ͳͯ͘΋ LLDB ͰϩʔυͰ͖Δ expr (void*)dlopen( "/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2); expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];

Slide 17

Slide 17 text

iOS ࣮ػͷ৔߹ • ࣄલʹ Copy Resources ͕ඞཁ͚ͩͲɺLink ͸ෆཁ expr (void*)dlopen( [(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2); expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];

Slide 18

Slide 18 text

AppCode integration • AppCode ͳΒɺDebug Condigurations Ͱ Inject Reveal library on launch Λ༗ޮʹ͓͚ͯ͠͹ OK • ͓ͦΒ͘લड़ͷํ๏Λࣗಈతʹ΍ͬͯ͘Ε͍ͯΔ

Slide 19

Slide 19 text

Have a happy REVEAL life!