-
AppKitでファイル選択ダイアログを表示する方法
AppKitのNSOpenPanelクラスを使うと、macOS標準のファイル選択ダイアログを表示できます。ファイル選択ダイアログは、開くファイルを選択するという機能の他に、Sandbox化されたアプリに対して、ファイルシステム上の指定したディレクトリに対するアプリか... -
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で... -
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に変更する方法に... -
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にアクセスするには、... -
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にアクセスするには、アクセス... -
Google ChromeのWebページ翻訳機能の使い方
前回の続きで、複数回に分けてすぐに利用可能な機械翻訳機能を紹介します。今回はGoogle ChromeのWebページ翻訳機能の使い方を紹介します。前回の記事については次のリンクを開いてください。 海外の学習プラットフォームも身近になる スキルアップやリス... -
SafariのWebページ翻訳機能の使い方
プログラミングやCGの勉強や調査を行っていると、最新の情報は英語で書かれているということに気がつくと思います。APIリファレンスなどで使われている英語はシンプルな表現が多いのですが、アルゴリズムの解説や背景の解説、学術寄りの話題など、コードの... -
How To write C++ callbacks with Swift’s closure
This article provides instructions on how to write a callback function using Swift's closure for interfacing with a library written in C++ from Swift application. Interoperability with C++ is now an official feature in Swift 5.9. This ar... -
C++のコールバックをSwiftのクロージャーで書くには
C++で実装されたライブラリがあり、それをSwiftで実装しているアプリから使いたいというときに、ライブラリに渡すコールバック処理をSwiftのクロージャーで書くにはどうしたらよいかについて解説します。 Swift 5.9でC++との相互運用機能が正式機能になり... -
How to avoid pod install errors when building Flutter apps
At times, when building a Flutter app on an Apple Silicon Mac, like a MacBook Pro M1, you may encounter failure during pod install. This is when the CocoaPods installation process is executed, for example, by adding a package. This artic... -
Flutterアプリビルドでのpod installのエラー回避方法
MacBook Pro M1など、Apple Silicon Mac上でFlutterのアプリをビルドしようとしたときに、pod installがエラーになってしまうときがあります。例えば、パッケージを追加するなどして、CocoaPodsのインストール処理が実行されるときです。 この記事ではエラ... -
How to read/write control values in AppKit (about outlets) | How to Create macOS Apps
In the previous article, we implemented executing an action when clicking a button. Actions with buttons are one of the basic things common to most applications. Similarly, reading and writing controls' values are a common issue in appli... -
AppKitでコントロールの値を読み書きする方法(アウトレットについて) | macOSアプリの作り方
前回はボタンをクリックしたときにアクションを実行するという処理を実装しました。ボタンによるアクションは一般的なアプリで共通する基本的な事柄の一つです。同様にアプリ開発で共通する事柄の一つに、コントロールの値の読み書きがあります。 コントロ... -
How to create buttons in AppKit (about targets and actions) | How to create macOS Apps
Buttons are among the most frequently used elements in applications. In this article, we will add a "Quit" button to the Cocoa Hello World so that the application can also quit from the button. This article will continue from the Cocoa H... -
AppKitでのボタンの作り方(ターゲットとアクションについて) | macOSアプリの作り方
アプリ内でボタンは頻繁に使用する要素の一つです。今回はCocoa版Hello Worldに終了ボタンを追加して、ボタンからも終了できるようにします。 この記事では前回の記事で作成したCocoa版Hello Worldの続きから行います。前回の記事に沿って作成している場合... -
Resolving iOS Simulator Issues on Apple Silicon Mac (arm64 Binary Error)
Specific frameworks incorporated into an application may lead to an error, preventing the iOS simulator from running on an Apple Silicon Mac. ld: in /Volumes/Data/src/RK/TechGakuWebSite/SampleCodes/OpenCVTest_iOS/common/opencv2.framework...