Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
stackViewを使ってボタンをつくった話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
sun54907
November 28, 2017
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
stackViewを使ってボタンをつくった話
potatotips #45 で話したものです。
sun54907
November 28, 2017
More Decks by sun54907
See All by sun54907
CreateMLを使ってサクラを判定しよう | iOSDC 2018 LT
sun54907
1
1.5k
既存のプロジェクトに、Firestoreを導入してみた
sun54907
1
1.2k
Introducing Password AutoFill
sun54907
1
600
3年間作り続けて来たアプリをSwift化した話
sun54907
0
7k
Other Decks in Programming
See All in Programming
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
2
540
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.3k
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
160
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.7k
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
0
370
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
FreeBSDでZabbixを動かす
kenkino
0
350
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
130
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
20k
Featured
See All Featured
Test your architecture with Archunit
thirion
2
2.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
560
Speed Design
sergeychernyshev
33
2.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
450
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
540
Automating Front-end Workflow
addyosmani
1369
210k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
720
Facilitating Awesome Meetings
lara
57
7.2k
Transcript
STACKVIEWΛͬͯ ɹϘλϯͭͬͨ͘
ςΩετ ࣗݾհ ▸ αϯʢւ ʣ ▸ גࣜձࣾαΠόʔΤʔδΣϯτ ▸ גࣜձࣾϚονϯάΤʔδΣϯτ ▸
@sun54907
ςΩετ ͏ͪͷΞϓϦ ▸ λοϓϧ
ςΩετ λοϓϧੜ ▸ 20145݄ϦϦʔε ▸ Swift 95% ▸ Swift 4
ରԠத ▸ ઌʑ݄ʹiOS8ΛΓ·ͨ͠
ςΩετ ։ൃͷ ▸ λοϓϧੜͰίϯϙʔωϯτԽΛਐΊ͍ͯΔ ▸ ৭UIύʔπͷ౷ҰΛਐΊ͍ͯΔ ▸ ن֨Խ͞ΕͨϘλϯΛ࡞Δ͜ͱʹͳͬͨ
Ϙλϯͷ
ςΩετ Ϙλϯͷཁ݅ ▸ λΠτϧɺλΠτϧࠨͷը૾ɺλΠτϧӈͷը૾͕͋Δ ▸ λΠτϧ৭എܠ৭͕ύλʔϯଘࡏ͢Δ ▸ ݟͨͷߴ͕͞28px͘Β͍ͷϘλϯ͋Δ ▸ ༰ʹ߹Θͤͨ෯ʹͳͬͨΓɺݻఆ෯ʹͳͬͨΓ͢Δ
Ϙλϯϥϕϧ Ϙλϯϥϕϧ Ϙλϯϥϕϧ Ϙλϯϥϕϧ ※σβΠϯ։ൃதͷͷͰ͢ɻ࣮ࡍͷ൛ͱҟͳΔՄೳੑ͕͋Γ·͢
ICON BUTTON VIEW https://github.com/sun54907/IconButtonView
ςΩετ ͍ํ let buttonView = ComponentButtonView.instantiate( data: .init(text: “Ϙλϯϥϕϧ”), style:
.medium(.fill), colorType: .primary ) stackView.addArrangedSubview(buttonView)
ͨ͠ ɹ ϙΠϯτ
STACKVIEWͰ WRAP_CONTENT
ςΩετ Ϙλϯͷཁ݅ ▸ λΠτϧɺλΠτϧࠨͷը૾ɺλΠτϧӈͷը૾͕͋Δ ▸ λΠτϧ৭എܠ৭͕ύλʔϯଘࡏ͢Δ ▸ ݟͨͷߴ͕͞28px͘Β͍ͷϘλϯ͋Δ ▸ ༰ʹ߹Θͤͨ෯ʹͳͬͨΓɺݻఆ෯ʹͳͬͨΓ͢Δ
ςΩετ Ϙλϯͷཁ݅ ▸ λΠτϧɺλΠτϧࠨͷը૾ɺλΠτϧӈͷը૾͕͋Δ ▸ λΠτϧ৭എܠ৭͕ύλʔϯଘࡏ͢Δ ▸ ݟͨͷߴ͕͞28px͘Β͍ͷϘλϯ͋Δ ▸ ༰ʹ߹Θͤͨ෯ʹͳͬͨΓɺݻఆ෯ʹͳͬͨΓ͢Δ
ςΩετ ▸ ༰ʹ߹Θͤͨ෯…·͋ɺautoLayoutͰ৭ʑͰ͖Δ͔ͳ… ▸ ͰςΩετͱը૾Ͱ࡞Δ͔ΒɺͦΕͧΕ͕͋Δ߹ͱͳ͍ ߹ରԠ͢Δͷ໘…
ͦΕɺSTACKVIEWͳΒͰ͖ΔΑ
ςΩετ STACKVIEWͱ ▸ iOS9͔Β͑Δػೳ ▸ AutoLayout Λઃఆ͢Δ View Λάϧʔϐϯάͯ͠ɺ·ͱΊ ੍ͯΛઃఆ͢Δ͜ͱ͕Ͱ͖Δ
▸ https://qiita.com/yucovin/items/ff58fcbd60ca81de77cb
STACK VIEW direction
STACK VIEW thirdView.isHidden = true
STACK VIEW
STACK VIEW ࣗಈతʹௐ͞ΕΔʂ
ࣗಈతʹௐ͞Εͨ݁Ռ
ςΩετ ଞͷϙΠϯτ ▸ Ϙλϯͷݟͨͷେ͖͞ΑΓɺ࣮ࡍʹλοϓͰ͖ΔൣғΛେ ͖͘͢Δ ▸ ߴ͞จࣈͷେ͖͞ΛܾΊΔύϥϝʔλΛprotocolʹ͠ɺ͋ Δఔࣗ༝ʹΧελϚΠζՄೳʹͨ͠
ςΩετ ▸ ৭ͷࢦఆ͕୯৭͔͠ରԠͯ͠ͳ͍ͷͰɺόϦΤʔγϣϯΛͭ ͚͍ͨ ▸ λοϓͯ͠৭͕มΘΔͷɺnormal, highlighted, disableͷ3 ύλϯ͔͠ͳ͍ͷͰɺશ෦ʹରԠ͍ͨ͠
▸ ໊લ͕͋Μ·Γؾʹೖͬͯͳ͍ ▸ xib͔Βੜͯ͠Δ͕ɺશ෦ίʔυͰੜͨ͠ํ͕͍қͦ͏ ▸ ެ։ͯ͠Δ͚Ͳɺ·ͩಈ͔ͳ͍
͋ΜͳΜී௨͡ΌΜ ࡞Γ͕ѱ͍ ͬͱ៉ྷʹͰ͖Δ ͦΜͳΓํ͋Δͷ͔ʙ ษڧʹͳͬͨͳʙ ҙݟɺ൷ืू͓ͯ͠Γ·͢ʂ ϚϦΦΦσοηΠ Γ͍ͨ
͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠