XCode

ダークモード無効化

Info.plistにキー"Appearance"とバリュー"Light"を追加する。

フォント追加

ステップ1 ステップ2 現在使えるフォントを確認する: for family in UIFont.familyNames.sorted() { let names = UIFont.fontNames(forFamilyName: family) print("Family: \(family) Font names: \(names)") }

UIKitでStoryboardなしのアプリを作る

XcodeでUIKitのアプリを作成する。 Main.storyboardを削除する。 ProjectファイルのTarget -> General -> Deployment Info -> Main Interfaceを空欄にする。 Info.plist -> Application Scene Manifest -> Scene Configuration -> Application Session Role …

Macアプリの表示名変更

TargetのBuild Settingsの中、"product name"を検索して、その値を変更する。

Simulatorの録画

xcrun simctl io booted recordVideo ファイル名.mov

クラス、方法、パラメーターのコメント便利追加法

command + option + /

2倍解像度の画像の追加

画像ファイル名を"xxx@2x.png"のようにリネームして、XcodeのAssets.xcassetsにドロップする。