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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
610
3年間作り続けて来たアプリをSwift化した話
sun54907
0
7k
Other Decks in Programming
See All in Programming
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
310
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.5k
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
170
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
120
Getting Started with Vibe Coding
miccheng
0
200
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
580
Seven New Principles of Software Engineering
yegor256
0
470
SODA - FACT BOOK(EN)
sodainc
1
230
Featured
See All Featured
For a Future-Friendly Web
brad_frost
184
11k
エンジニアに許された特別な時間の終わり
watany
109
250k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
240
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
600
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
510
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
350
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Product Roadmaps are Hard
iamctodd
55
13k
Skip the Path - Find Your Career Trail
mkilby
1
290
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
560
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͔Βੜͯ͠Δ͕ɺશ෦ίʔυͰੜͨ͠ํ͕͍қͦ͏ ▸ ެ։ͯ͠Δ͚Ͳɺ·ͩಈ͔ͳ͍
͋ΜͳΜී௨͡ΌΜ ࡞Γ͕ѱ͍ ͬͱ៉ྷʹͰ͖Δ ͦΜͳΓํ͋Δͷ͔ʙ ษڧʹͳͬͨͳʙ ҙݟɺ൷ืू͓ͯ͠Γ·͢ʂ ϚϦΦΦσοηΠ Γ͍ͨ
͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠