
SwiftUI GeometryReaderの位置は気をつけないと。
LazyVGridでGeometryReaderを使用する ダメな例 ScrollViewとLazyVGridの間にGeometryReaderを入れたケース。 ...

SwiftUI Font指定(システムフォント)
Font Structureのstaticメソッドを使用します。 static func system(size: CGFloat, weight: Font. ...

SwiftUI 枠内どこでも反応、Long Pressも反応するボタンを作成する
やりたい事 ①枠内どこでも反応 ②Tap:Tap用のアクション ③Long Press:Long Press用のアクション 1stアクション コード 結果 やり ...

Swift NumberPlusMinusInputViewを改修
以前の記事「SwiftUI Stepper、イメージした形にするにはlabelだけでは出来なかった」に登場していたNumberPlusMinusInputVie ...

Swift リスト内をランダム
リスト内をランダムで並べ替える Swift Algorithmが便利。 Swift Algorithm準備 Swift Packagesで追加する。 Examp ...

Swift アプリに対応した設定画面を開く
アプリに対応した設定画面を開く アプリのボタンアクションに下記コードを入れる。 設定画面に遷移します。

Swift iPadアプリ、M1 Mac上での動作なのか判断する
iPadアプリ、M1 Mac上での動作なのか判断する やりたい事、M1 MacでiPadアプリを動かすときにorientationを固定したい。 上記で判断つく ...

Swift UITextFieldに独自キーボード、上部のショートカットバーを非表示にする
UITextFieldに独自キーボード NumberInputViewや細かい処理は省略。 上部のショートカットバーを非表示にする UITextFieldのin ...

Swift Device Orientationをコードで制限する
Device Orientationをコードで制限するには プロジェクトファイルのTARGETS-General-Deployment InfoのDevice ...

Simulator、28インチ(3840×2160)、iPad系3種類横並び
iPad mini 4、iPad Pro 11inch 2nd、iPad Pro 12.9 4thを一画面で確認出来るのはデザイン比較に便利 28インチ(384 ...