Slide 1

Slide 1 text

題: 発表者: 場所: 日付: ؀ڥઃఆͷ࡞๏ KQ NBD04OBUJWF4ZNQPTJVN

Slide 2

Slide 2 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ࣗݾ঺հ KQ ͸ NBD04 ΞϓϦέʔγϣϯઐ໳ͷϗϏʔ։ൃऀɻ 044 ϓϩδΣΫτӡӦ͔ΒϓϩάϥϛϯάɺΞΠίϯͷσ βΠϯ·ͰɺNBD04 ͷΞϓϦέʔγϣϯ։ൃʹؔΘΔ͜ ͱͳΒશ෦΍ΔϚϯͰ͋Δɻ ͤΜʹ͡Ύ͏ΑΜ
 ͐͡ʔͽʔ 本業ではないよ

Slide 3

Slide 3 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ࣗݾ঺հ CotEditor Gapplin BathyScaphe Qli application work plain-text editor SVG viewer 5ch browser movie player 2014年に
 正式引き継ぎ サポーtメンバー
 (主にデザイン・UI) 新作

Slide 4

Slide 4 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢ ࠓ೔ͷओ໾

Slide 5

Slide 5 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢ Toolbar Title Bar Preferences
 Pane Control Label Application Menu

Slide 6

Slide 6 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢

Slide 7

Slide 7 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢ͷྺ࢙ cite: Mac OS X 10.0 Cheetah, 512 Pixels, on 2018-12
 https://512pixels.net/projects/aqua-screenshot-library/mac-os-x-10-0-cheetah/ Mac OS X 10.0 | Mail.app

Slide 8

Slide 8 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢ͷྺ࢙ cite: Playing around with Mac OS X Puma –YouTube, on 2018-12
 https://www.youtube.com/watch?v=2SBI27xUnug Mac OS X 10.1 | System Preferences © 2018 1024jp

Slide 9

Slide 9 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp )VNBO*OUFSGBDF(VJEFMJOFT

Slide 10

Slide 10 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp )VNBO*OUFSGBDF(VJEFMJOFT A preferences window is a modeless dialog that’s used to adjust an app’s preferences. Typically, a preferences window contains a toolbar that includes buttons for switching between groups of related settings, which are displayed in a view beneath the toolbar. These groupings are known as preference panes. cite: “Preferences Windows”, macOS Human Interface Guidelines, on 2018-12 ؀ڥઃఆ΢Πϯυ΢͸ΞϓϦέʔγϣϯͷ؀ڥΛௐ੔͢ΔϞʔυϨεͷμΠΞϩά Ͱ͋ΔɻҰൠతʹ؀ڥઃఆ΢Πϯυ΢͸ɺؔ܎͢ΔઃఆͷάϧʔϓΛ੾Γସ͑ΔϘ λϯΛ಺แͨ͠πʔϧόʔΛ͍࣋ͬͯΔɻ͜ΕΒάϧʔϓ͸؀ڥઃఆϖΠϯͱͯ͠ ஌ΒΕΔɻ Preferences Windows

Slide 11

Slide 11 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp )VNBO*OUFSGBDF(VJEFMJOFT cite: “Preferences Windows”, macOS Human Interface Guidelines, on 2018-12 Preferences Windows – Apply preference changes immediately. – Disable the Minimize and Zoom buttons. – Make sure the toolbar is always visible and noncustomizable. – Indicate the active toolbar button. – Update the window's title to reflect the currently visible preference pane. – Restore the last viewed preference pane. ࠷ޙʹදࣔͨ͠ϖΠϯΛอ࣋͢Δɻ ݱࡏදࣔ͞Ε͍ͯΔϖΠϯΛ΢Πϯυ΢λΠτϧʹ͢Δɻ ΞΫςΟϒͳϖΠϯͷπʔϧόʔϘλϯΛબ୒͢Δɻ ͭͶʹπʔϧόʔΛදࣔ͠ɺ͔ͭฤूෆՄʹ͢Δɻ ࠷খԽϘλϯͱζʔϜϘλϯ͸ແޮʹ͢Δɻ ઃఆͷมߋ͸͙͢ʹ൓ө͢Δɻ

Slide 12

Slide 12 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ? ؀ڥઃఆ΢Πϯυ΢ͷجຊͷৼΔ෣͍ ࠷ޙʹදࣔͨ͠ϖΠϯΛอ࣋͢Δɻ ݱࡏදࣔ͞Ε͍ͯΔϖΠϯΛ΢Πϯυ΢λΠτϧʹ͢Δɻ ΞΫςΟϒͳϖΠϯͷπʔϧόʔϘλϯΛબ୒͢Δɻ ͭͶʹπʔϧόʔΛදࣔ͠ɺ͔ͭฤूෆՄʹ͢Δɻ ࠷খԽϘλϯͱζʔϜϘλϯ͸ແޮʹ͢Δɻ ઃఆͷมߋ͸͙͢ʹ൓ө͢Δɻ ӈԼʹϔϧϓϘλϯΛ෇͚Δɻ ϖΠϯഎܠ͸σϑΥϧτ৭ɻ σεΫτοϓʹରͯ͠ηϯλϦϯάͯ͠දࣔ͢Δɻ EscΩʔͰ΢Πϯυ΢Λด͡Δɻ esc

Slide 13

Slide 13 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ؀ڥઃఆ΢Πϯυ΢ͷϖΠϯ੾Γସ͑

Slide 14

Slide 14 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ϖΠϯ੾Γସ͑ͷྲྀΕ General Advanced πʔϧόʔΞΠίϯΛΫϦοΫ ϖΠϯඇදࣔ ΢Πϯυ΢มܗ ϖΠϯදࣔ ΢Πϯυ΢λΠτϧมߋ ① ② ③ ΫϦοΫͨ͠ΞΠίϯΛબ୒ General Advanced

Slide 15

Slide 15 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp – ͜Μͳʹڧ͍ఆܕ͕͋ΔͷʹɺͦͷৼΔ෣͍Λఏڙ͢Δ Cocoa API ͸ ɹ ɹɻ – ͱ͜ΖͰɿmacOS ։ൃऀ͸ Interface Builder ͕޷͖ɻ – ؀ڥઃఆ΢Πϯυ΢͸Ұ൪ Interface Builder ͕׆͖Δ✨ͱ͜Ζɻ ؀ڥઃఆ΢Πϯυ΢Λ࡞Δ Modern ✔ Storyboard ✔ NSTabViewController Legacy ✔ Xib ✔ NSWindowController →みんな独自に実装しているのだ(マジかよ... ੲ͔Β ͳ͍ ͩͬͯ Cocoa Binding ͸
 ɹɹɹɹɹ ɹɹ࠷ߴͩ΋ͷɻ

Slide 16

Slide 16 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp $PDPB όΠϯσΟϯά ͩͬͯ Cocoa Binding ͸
 ɹɹɹɹɹ ɹɹ࠷ߴͩ΋ͷɻ – Key-Value Observation Λར༻ͨ͠ View ͱ Model-Controller ૚ͷಉظػೳɻ – macOS ʹ͔͠ͳ͍ɻ – Interface Builder ͔Βར༻Մೳ Moof! Input Field UserDefaults Text Field bind bind Moof! NSObjectベースである必要がある Mac OS X 10.3 Panther から存在 → 冗長なグルーコードが不要に。 .value [“message”] .value Model View View

Slide 17

Slide 17 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp Let’s code! https://github.com/1024jp/Preferences-Demo

Slide 18

Slide 18 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp 4UPSZCPBSE ࣮૷ͷ᠘ ⚠ NSTabViewItem.label ͕ϩʔΧϥΠζ͞Εͳ͍ɻ࠷ѱͩɻ ⚠ tabView(tabView:willSelect:) ͰͷεΠον͸ macOS 10.12↓ Ͱࢮ͵ɻ – “endAppearanceTransition called too many times” ͩͦ͏Ͱ͢ɻ – macOS 10.13 Ҏ্͔͠૬खʹ͠ͳ͍ͳΒؾʹ͠ͳͯ͘Α͍ɻ – tabView(tabView:willSelect:)  Ͱ͸  tabViewItem.frame  Λर͏͚ͩʹͯ͠ tabView(tabView:didSelect:) ͰεΠον͠Α͏ɻ → viewDidLoad() あたりで手動でローカライズしよう。 → macOS 10.12を切ろう。

Slide 19

Slide 19 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ·ͱΊ – ࠷ޙʹදࣔͨ͠ϖΠϯΛอ࣋͢Δɻ – ݱࡏදࣔ͞Ε͍ͯΔϖΠϯΛ΢Πϯυ΢λΠτϧʹ͢Δɻ – ΞΫςΟϒͳϖΠϯͷπʔϧόʔϘλϯΛબ୒͢Δɻ – ͭͶʹπʔϧόʔΛදࣔ͠ɺ͔ͭฤूෆՄʹ͢Δɻ – ࠷খԽϘλϯͱζʔϜϘλϯ͸ແޮʹ͢Δɻ – ઃఆͷมߋ͸͙͢ʹ൓ө͢Δɻ ʴ – ӈԼʹϔϧϓϘλϯΛ෇͚Δɻ – ϖΠϯഎܠ͸σϑΥϧτ৭ɻ – σεΫτοϓʹରͯ͠ηϯλϦϯάͯ͠දࣔ͢Δɻ – EscΩʔͰ΢Πϯυ΢Λด͡Δɻ by ౒ྗ໨ඪ by HIG  Cocoa Binding ͸࠷ߴɻ

Slide 20

Slide 20 text

macOS native ؀ڥઃఆͷ࡞๏ © 2018 1024jp ͓ Θ Γ