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
Exit 8 for SwiftUI
Search
ojun
April 12, 2025
Programming
300
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Exit 8 for SwiftUI
ojun
April 12, 2025
More Decks by ojun
See All by ojun
配列と所有権
ojun9
0
80
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
400
アセットのコンパイルについて
ojun9
0
260
Swift Evolution かるた
ojun9
2
140
Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察
ojun9
4
1.1k
Catch Up with Swift 5.10
ojun9
2
920
Overview: Swift OpenAPI Generator
ojun9
3
2.6k
if 式と switch 式による SwiftUI のプレビューエラー対策
ojun9
1
2.3k
楽しい夏休み!String Catalogs で新しい発見
ojun9
0
2.6k
Other Decks in Programming
See All in Programming
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
190
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
170
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
120
Contextとはなにか
chiroruxx
1
390
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
390
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
160
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.8k
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
200
Performance Engineering for Everyone
elenatanasoiu
0
270
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.3k
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
The Curse of the Amulet
leimatthew05
2
13k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Paper Plane (Part 1)
katiecoart
PRO
0
9.6k
The Curious Case for Waylosing
cassininazir
1
430
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
エンジニアに許された特別な時間の終わり
watany
107
250k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Transcript
Exit 8 for SwiftUI ojun - DeNA co., Ltd. try!
Swift Tokyo 2025 LT 2025 / 04 / 11
None
Exit 1 Prevent double taps or simultaneous taps
Exit 1 Prevent double taps or simultaneous taps Two buttons
inside a VStack
Exit 1 Prevent double taps or simultaneous taps In this
case, we need to prevent multiple buttons from being tapped simultaneously. However, SwiftUI doesn’t provide a direct API to handle mutual exclusion between buttons.
Exit 1 Prevent double taps or simultaneous taps Set isExclusiveTouch
to false on the wrapped UIView and all of its child views. If needed, implement a custom gesture recognizer to handle touch exclusivity.
None
Exit 2 Match the line height to the Text
Exit 2 Match the line height to the Text Inside
the ZStack, there's a Color and an HStack. The HStack contains a Rectangle and a titleView.
Exit 2 Match the line height to the Text This
UI is similar to what you might see in a train schedule display.
Exit 2 Match the line height to the Text This
UI is similar to what you might see in a train schedule display. However, you can see that the orange line doesn't match the height of the Text.
Exit 2 Match the line height to the Text By
creating a structure that conforms to the Layout protocol, you can align their heights.
Exit 2 Match the line height to the Text Applying
this layout to the original code allows the orange line to match the height of the Text.
None
Exit 3 Customize the loading indicator
Exit 3 Customize the loading indicator
Exit 3 Customize the loading indicator Since customization isn't possible
in SwiftUI, we need to implement it using UIKit.
None
Exit 4 Dismiss the keyboard on scroll
Exit 4 Dismiss the keyboard on scroll This behavior is
supported on iOS 16 and later. The keyboard automatically hides when the user scrolls, which simpli fi es the design.
Exit 4 Dismiss the keyboard on scroll By using scrollDismissesKeyboard,
we can implement this in a much simpler way.
Exit 5 Presenting a share sheet
Exit 5 Presenting a share sheet This code works on
iOS 16 and later. We're currently using UIActivityViewController to show the Share Sheet.
Exit 5 Presenting a share sheet By switching to ShareLink,
we can eliminate the dependency on UIKit.
Exit 6 Empty data state
Exit 6 Empty data state
Exit 6 Empty data state
Exit 7 Mesh gradient expression
Exit 7 Mesh gradient expression
Exit 7 Mesh gradient expression Starting from iOS 18, MeshGradient
makes it easy to implement mesh gradients.
None
Exit 8 Square Without GeometryReader
Exit 8 Square Without GeometryReader
Exit 8 Square Without GeometryReader It's possible to create a
square without using GeometryReader by leveraging scaledToFit.
None
None