-
開発
SwiftUIで使うウインドウをAppKitで作る
macOS Monterey 12.4 + Xcode 13.4.1時点では、ウインドウ生成に関する処理をSwiftUIで作ろうとすると、WindowGroupとDocumentGroupしか選択肢がなく、シングルウインドウアプリは作れません。また、メニューバーをすべてアプリ側で定義することもできませ... -
Development
Set the window size in SwiftUI
This article explains how to set the window size, maximum and minimum sizes in a SwiftUI app. Defining a Window by WindowGroup When you define a window using the WindowGroup, your code would look something like this: import SwiftUI @main... -
開発
SwiftUIでウインドウサイズを設定する方法
SwiftUIを用いてmacOSアプリを開発する際、ウインドウサイズの初期値、最大値、最小値の設定方法を本記事で解説します。 WindowGroupを使っているとき WindowGroupを使っているコードでウインドウを定義するコードが次のようになっているとします。 import... -
Development
How to terminate the SwiftUI app when the window is closed
This article explains how to terminate the SwiftUI app when the window is closed. With the WindowGroup Suppose you specify the SwiftUI to the "Interface" of the project option when you create the project. In that case, the generated code... -
開発
SwiftUIでウインドウを閉じたときにアプリを終了する方法
SwiftUIで開発されたmacOSアプリで、ウインドウが閉じられた時点でアプリを終了する方法を本記事では解説します。 WindowGroupを使っているとき プロジェクト作成時に、InterfaceにSwiftUIを指定すると、ウインドウを作成するコードは次のようになっていま... -
Development
How to create tabs in SwiftUI
Use TabView to create tabs in SwiftUI. This article demonstrates how to create tabs in SwiftUI. Basic Structure The TabView is used in the following structure. struct ContentView: View { var body: some View { TabView { // --- START --- /... -
開発
SwiftUIでのタブの作り方
SwiftUIでタブを作るにはTabViewを使用します。本記事ではSwiftUIでのタブの作り方を解説します。 基本的な構造 TabViewは次のような構造で使用します。 struct ContentView: View { var body: some View { TabView { // --- ここから --- // タブ内に表示... -
Development
[SwiftUI] Layout adjustment on the Conversion tab of the Preferences window
We are attempting to re-implement MultiTextConverter in Swift. This time, continuing with the creation of the look and feel of the preferences window, we are adjusting the layout of the conversion tab. For background information, please ... -
開発
【SwiftUI】環境設定ウインドウの変換タブのレイアウト調整
MultiTextConverterをSwiftで再実装してみるという試みを行っています。今回は環境設定ウインドウのGUI作成の続きで、変換タブのレイアウト調整です。 経緯はこちらの記事をご覧ください。 調整内容の確認 前回の記事で環境設定ウインドウの変換タブを作成... -
Development
[SwiftUI] Create a tab in the Preferences window
I am attempting to reimplement MultiTextConverter in Swift. This time, I am creating the look and feel of the preferences window. Please see this article for the background. The window of the MultiTextConverter 3.6 In the MultiTextConver... -
開発
【SwiftUI】環境設定ウインドウのタブを作る
MultiTextConverterをSwiftで再実装してみるという試みを行っています。今回は環境設定ウインドウの見た目の作成です。 経緯はこちらの記事をご覧ください。 MultiTextConverter 3.6のウインドウ MultiTextConverter 3.6では、MultiTextConverterメニュー... -
Development
I am interested in developing a Swift version of MultiTextConverter
I developed and released a macOS application called MultiTextConverter as freeware. Its main functions are the conversion of text encoding of text files and the conversion of line feed characters. It is available on the RK Kaihatsu websi... -
開発
MultiTextConverterのSwift版の開発に興味が湧く
筆者が以前、開発して、フリーウェアとして公開しているMultiTextConverterというmacOSアプリがあります。主要な機能はテキストファイルのテキストエンコーディングの変換と改行文字の変換です。 アールケー開発のWebサイトで公開しています。 最初のバー... -
Development
How to resolve xcpretty locale error launched from GitLab CI
When executing XCTest through GitLab CI, you may encounter the following error. /Library/Ruby/Gems/2.6.0/gems/xcpretty-0.3.0/lib/xcpretty/parser.rb:434:in `===': invalid byte sequence in US-ASCII (ArgumentError) from /Library/Ruby/Ge... -
開発
GitLab CIとxcprettyのロケールエラー解消の手順
GitLabのCIによるXCTest実行中に、特定のエラーによりジョブが失敗する事象が確認されています。 /Library/Ruby/Gems/2.6.0/gems/xcpretty-0.3.0/lib/xcpretty/parser.rb:434:in `===': invalid byte sequence in US-ASCII (ArgumentError) from /Libr... -
Development
Specify the XCTest test environment in which GitLab CI will run
When conducting XCTest testing using GitLab CI, you must define the test environment. If the machine running Runner on the macOS app is an Apple Silicon machine, do we run it natively, or do we run the Intel binary with Rosetta2? If you ... -
開発
GitLab CIが実行するXCTestのテスト環境を指定する
GitLabのCIにXCTestを利用した、テストを設定する際、テスト環境を明示的に指定する必要があります。 テスト対象がmacOSアプリで、Runnerを実行しているマシンがApple Silicon Macである場合には、2つの選択肢があります。ネイティブで実行するのか、それ... -
Development
Create PDF from Markdown using Marked2
Documents maintained in Git are easier to manage and update when written in Markdown, as opposed to Word or Excel. However, even though Markdown is suitable for viewing from GitLab and other sites that render Markdown, it's often more vi... -
開発
Marked2を使ってMarkdownからPDFを作る
Gitで管理するドキュメントは、WordやExcelよりもMarkdownで書くことで保守性が高まり、更新作業も容易になります。 しかし、Markdownで作成したドキュメントは、GitLabなどのMarkdownをレンダリングしてくれるサイトでは適切に表示されますが、外部配布向... -
Development
Automate XCTest with GitLab’s CI
GitLab has a Continuous Integration (CI) feature that allows you to perform continuous integration without deploying a separate solution dedicated to CI. Therefore, whenever I push my code to GitLab, XCTest is triggered to run unit tests...
