-
Development
Part 3 Displaying the Current Value Knob | Create the Color Picker with SwiftUI
This is a series of articles on creating a color picker in SwiftUI. We created a text field in the previous article to display the current value. In this article, we will continue the process by implementing the look and feel of the proc... -
開発
第3回 現在値のノブを表示する | SwiftUIでカラーピッカーを作る
SwiftUIでカラーピッカーを作るという連載記事です。前回、現在値を表示するテキストフィールドを作りましたので、今回はその続きで、グラデーションビュー上に現在値を示すノブを表示する処理の見た目を実装します。 ノブの形状ですが、この記事では次の... -
Development
Dynamically Getting the View Size in SwiftUI
In a SwiftUI app, you can use GeometryReader to dynamically get the view size. This article explains how to do it. Output the View Size into the Console Following the code, get the view size using GeometryReader and print it into the con... -
開発
SwiftUIでビューの大きさを動的に取得する
SwiftUIでアプリ実行中に動的にビューの大きさを取得するには、GeometryReaderと組み合わせる方法があります。 この記事では具体的な方法とコード例を解説します。 ビューのサイズをコンソールに出力する GeometryReaderと組み合わせて、ビューの大きさを... -
Development
Part 2 Displaying the Current Value | Create the Color Picker with SwiftUI
This is a series of articles about creating a color picker in SwiftUI. The current value of the color picker we're creating in this series will be displayed as follows. Display labels and values above the gradient view Values can be edit... -
開発
第2回 現在値を表示する | SwiftUIでカラーピッカーを作る
SwiftUIでカラーピッカーを作るという連載記事です。この連載で作成するカラーピッカーの現在値は次のような表示にしたいと思います。 グラデーションビューの上にラベルと値を表示する 値はキーボードから編集出来るようにする グラデーションビュー上に... -
Development
Part 1 Displaying Gradients in SwiftUI | Create the Color Picker with SwiftUI
In this multi-part series, we will create a color picker in SwiftUI. This time, we will create the gradient part to be displayed in the color picker. SwiftUIでグラデーションを表示する Displaying gradients in SwiftUI struct PickerGradatio... -
開発
第1回 SwiftUIでグラデーションを表示する | SwiftUIでカラーピッカーを作る
何回かに分けて、SwiftUIでカラーピッカーを作ってみます。今回はカラーピッカーに表示するグラデーション部分を作ります。 SwiftUIでグラデーションを表示する SwiftUIでグラデーションを表示するには、LinearGradientビューを使います。グラデーションの... -
Development
How to use binary representation of floating point numbers in Swift
To store floating-point numbers in binary files or binary data buffers, they are encoded as defined by IEEE 754; in Swift, the BinaryFloatingPoint protocol defines methods, etc., to support IEEE 754. For example, float, Double, and Float... -
開発
Swiftでの浮動小数点数のバイナリ表現の扱い方
バイナリファイルやバイナリデータバッファに浮動小数点数を格納するには、IEEE 754で定義されている方法で符号化します。Swiftでは、BinaryFloatingPointプロトコルでIEEE 754に対応したメソッドなどが定義され、Float、Double、Float80がBinaryFloatingP... -
Development
How to display the open file dialog in AppKit
AppKit's NSOpenPanel class can display the standard macOS file open dialog. In addition to selecting files to open, the open file dialog gives Sandboxed apps access to specified directories on the file system. This article explains how t... -
開発
AppKitでファイル選択ダイアログを表示する方法
AppKitのNSOpenPanelクラスを使うと、macOS標準のファイル選択ダイアログを表示できます。ファイル選択ダイアログは、開くファイルを選択するという機能の他に、Sandbox化されたアプリに対して、ファイルシステム上の指定したディレクトリに対するアプリか... -
Development
Converting Integer Types with Bit Patterns in Swift
To maintain bit patterns while converting integer types in Swift, utilize the provided initializer. init<T>(truncatingIfNeeded source: T) where T : BinaryInteger You can employ this initializer method to convert between unsigned an... -
開発
Swiftでビットパターンで整数型を変換する
Swiftでビットパターンを維持した状態で整数型を変換するには、次のイニシャライザを使用します。 init<T>(truncatingIfNeeded source: T) where T : BinaryInteger これを使って、符号無し整数と符号有り整数との間で変換できます。例えば、UInt8で... -
Development
Change the iOS app lifecycle from UIKit to SwiftUI
Newer versions of iOS and macOS have been released, and the features offered by SwiftUI have also expanded. As a result, it is becoming possible to use SwiftUI for the parts that can be created with SwiftUI and use it in conjunction with... -
開発
iOSアプリのライフサイクルをUIKitからSwiftUIに変更する
iOSやmacOSのバージョンが上がり、SwiftUIの機能も増えてきました。SwiftUIで作れる部分はSwiftUIを使い、UIKitと併用するということも徐々に出てきているのではないでしょうか? この記事では、アプリのライフサイクルをUIKitからSwiftUIに変更する方法に... -
Development
Setting up a GitLab account on Xcode
After setting up a GitLab account in Xcode, you can directly access GitLab repositories from Xcode. This article explains how to set up a GitLab account in Xcode. Generate a personal access token To access GitLab from Xcode, you need a p... -
開発
XcodeへのGitLabアカウントの設定
XcodeにGitLabアカウントを設定すると、XcodeからGitLabのリポジトリに直接アクセスできるようになります。 この記事では、XcodeにGitLabのアカウントを設定する方法を解説します。 パーソナルアクセストークンの生成 XcodeからGitLabにアクセスするには、... -
Development
Setting up a GitHub account on Xcode
After setting up a GitHub account in Xcode, you can access GitHub repositories directly from Xcode. This article explains how to set up a GitHub account in Xcode. Generate the access token To access GitHub with Xcode, you'll need an acce... -
開発
XcodeへのGitHubアカウントの設定
XcodeにGitHubのアカウントを設定すると、XcodeからGitHubのリポジトリに直接アクセスできるようになります。 この記事では、XcodeにGitHubのアカウントを設定する方法を解説します。 アクセストークンの生成 XcodeからGitHubにアクセスするには、アクセス...
