2021-01-01から1年間の記事一覧

WWDC2021 で発表された App Store の In-App Events

Meet in-app events on the App Store の内容まとめ。 developer.apple.com developer.apple.com In-App Events とは Meet in-app events on the App Store - WWDC21 - Videos - Apple Developer 下記のようなタイムリーなイベントを App Store 上で紹介する…

WWDC2021 で発表された App Store プロダクトページのカスタマイズと最適化

Get ready to optimize your App Store product page の動画の内容まとめ。 developer.apple.com この発表では、 App Store のプロダクトページにおける新機能である下記の2つの機能について紹介している。 任意の目的のためのプロダクトページカスタマイズ…

SwiftUI で画面下部にボタンを置く

NG 画面下部にボタンを置く場合、 bottom の Safe Area に被らないように置かないといけない。 何も考えずに置くと、下記のように Safe Area まで拡張されずに残念な感じになる。 VStack(spacing: .zero) { List(0..<100) { index in Text("\(index)") } But…

SwiftUI のボーダーボタン と clipped

四角ボタン 四角のボタンにボーダーをつける場合は .border modifier を指定すれば作れる。 Button("四角のボーダーボタン", action: {}) .frame(height: height) .padding() .background(Color.orange) .border(Color.red, width: borderWidth) 四角のボー…

The Composable Architecture(TCA)メモ

ViewStore binding public func binding<LocalState>( get: @escaping (State) -> LocalState, send localStateToViewAction: @escaping (LocalState) -> Action ) -> Binding<LocalState> https://github.com/pointfreeco/swift-composable-architecture/blob/main/Sources/Composab</localstate></localstate>…

SwiftUI の ScrollView を CustomShape で clip すると内部の View まで clip される

下記のように ScrollView に対して clippedShae(_:) で CustomShape を適用して clip すると、 ScrollView 内の View まで clip されてしまって View が途中で切れてしまう。 Rectangle 等の組み込みの Shape や、List に対してであれば問題は生じない。 Sta…

SwiftUI で透明な View に Gesture を設定する

下記のように、Color.clear のような透明のビューにジェスチャーを追加したかったけど反応しなかった。 import SwiftUI struct ExampleView: View { @State var text: String = "ケバブ" var body: some View { ZStack { Color.clear .onTapGesture { text =…