Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Storyboardいいよ
Search
Ryota Hayashi
June 23, 2017
Technology
1
2.2k
Storyboardいいよ
Storyboardについて話しました
Ryota Hayashi
June 23, 2017
Tweet
Share
More Decks by Ryota Hayashi
See All by Ryota Hayashi
パスワードレスアプリをつくる
hayashi311
0
1.2k
アイコンフォントの自動生成
hayashi311
2
1.7k
アセットマネジメントとシンボルフォントの話
hayashi311
0
250
Interface builderでカスタムViewのライブレンダリング
hayashi311
0
2k
Other Decks in Technology
See All in Technology
IPA&AWSダブル全冠が明かす、人生を変えた勉強法のすべて
iwamot
PRO
2
120
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
270
Connect 100+を支える技術
kanyamaguc
0
200
ビギナーであり続ける/beginning
ikuodanaka
3
750
MobileActOsaka_250704.pdf
akaitadaaki
0
120
SmartNewsにおける 1000+ノード規模 K8s基盤 でのコスト最適化 – Spot・Gravitonの大規模導入への挑戦
vsanna2
0
130
20250705 Headlamp: 專注可擴展性的 Kubernetes 用戶界面
pichuang
0
270
United airlines®️ USA Contact Numbers: Complete 2025 Support Guide
unitedflyhelp
0
310
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
960
Zephyr RTOSを使った開発コンペに参加した件
iotengineer22
1
220
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
120
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.4k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1370
200k
It's Worth the Effort
3n
185
28k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Designing for humans not robots
tammielis
253
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Embracing the Ebb and Flow
colly
86
4.7k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
GitHub's CSS Performance
jonrohan
1031
460k
Transcript
Storyboard͍͍Α @hayashi311
ΞϓϦ։ൃΉ͔͍ͣ
ϓϩμΫτͷҭͯํ
ݱ࣮ࢼߦࡨޡͷ܁Γฦ͠
ը໘ભҠ ը໘ϨΠΞτ UIίϯϙʔωϯτ ελΠϧ ϘλϯɺೖྗϑΟʔϧυͳͲ ςΩετ৭ͳͲ શମͷϨΠΞτɺ CellɺϔομͷϨΠΞτͳͲ
ը໘ભҠ ը໘ϨΠΞτ UIίϯϙʔωϯτ ελΠϧ Ұ؏ੑ͕ॏཁ ͨ·ʹมߋ มߋ͕ଟ͍
ը໘ભҠ ը໘ϨΠΞτ UIίϯϙʔωϯτ ελΠϧ Storyboard
ਏ͍ύλʔϯɺͨͱ͑ ελΠϧΛStoryboard্Ͱઃఆ͗͢͠ Ͱɺগͣͭ͠ελΠϧ͕ͣΕ͍ͯΔ
ਏ͍ύλʔϯɺͨͱ͑ UIίϯϙʔωϯτΛStoryboard্Ͱ࡞ΓࠐΈ͗͢ Ͱɺಉ͡StoryboardΛ2ͱ࡞Εͳ͍
Keep a storyboard simple StoryboardΧδϡΞϧʹ࡞ΓɺΧδϡΞϧʹࣺͯΔ ͦͷͨΊʹγϯϓϧʹ
Storyboardͱ૬ੑͷΑ͍UIίϯϙʔωϯτΛ࡞Δ ͦͯ͠ɺStoryboard؆୯ʹ
AutoLayoutͱ૬ੑͷ͍͍UIίϯϙʔωϯτΛ࡞Δ layoutSubviews intrinsicContentSize
@IBInspectable
hitTestͷoverride Button λοϓʹԠ͢ΔྖҬ Viewͷframe
UIWindowΛىʹhitTest͕࠶ؼతʹݺͼग़͞ΕΔ func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView?
{ if { for subview in subviews { if let hitView = subview. { return hitView } } return self } return nil }
Self-Sizing Cells
Self-Sizing Cells Self-Sizing Cells tableView.register(GoldenRatioCell.self, forCellReuseIdentifier: "Cell") tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 10
Self-Sizing Cells: ԫۚൺCell class GoldenRatioCell: UITableViewCell { override func systemLayoutSizeFitting(_
targetSize: CGSize, …) -> CGSize { return CGSize(width: targetSize.width, height: targetSize.width * 0.618) // ԫۚൺ } }
None
Storyboard
Storyboard AutoLayout - Code
Storyboard AutoLayout - Code layoutSubview
Storyboard AutoLayout - Code layoutSubview
Storyboard AutoLayout - Code layoutSubview
None
Storyboard
layoutSubview
มԽͷଟ͍ը໘ϨΠΞτʹStoryboardͷεϐʔυ͕ඞཁ Storyboard/ίʔυɺAutoLayout/layoutSubviewsΛΈ߹ΘͤΔ ࢼߦࡨޡͯ͠ɺ͍͍ΞϓϦΛ࡞Γ·͠ΐ͏ :)
None
2017.09.15 (Fri) - 17 (Sun)
None