import UIKit
final class CommonSectionHeader: UIView {
@IBOutlet var titleLabel: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
https://flutter.dev/docs/get-started/install/macos
$ mkdir Flutter // 任意の場所に作成
$ cd Flutter
$ unzip ~/Downloads/flutter_macos_v1.9.1+hotfix.2-stable.zip
### .bashrc or .zshenvあたりに追加
export PATH=~/Library/Flutter/flutter/bin:$PATH
import SwiftUI
struct ContentView: View {
@State var count = 1
var body: some View {
VStack(alignment: .center) {
Text("Count")
.font(.title)
- VirtualBoxで仮想環境構築
https://www.kali.org/docs/virtualization/install-virtualbox-kali-guest/
- frameworkのlink
- embed frameworkに追加しているか
- framework search pathの指定
- iOS16以降はUIHostingConfigurationを使うと良いです。
- 再利用の際にUIHostingのセットアップをしなおしているので、処理がやや重そうです。
final class HostingContentViewConfiguration<T: View>: UIContentConfiguration {
private(set) weak var parentVC: UIViewController?
private(set) var content: () -> T
init(parentVC: UIViewController?, @ViewBuilder content: @escaping () -> T) {
self.parentVC = parentVC
https://developer.apple.com/documentation/combine/anycancellable
Subscriber implementations can use this type to provide a “cancellation token” that makes it possible for a caller to cancel a publisher, but not to use the Subscription object to request items. An AnyCancellable instance automatically calls cancel() when deinitialized.
deinitで自動的にキャンセルが呼ばれるので、明示的にキャンセルを呼ぶ必要はなさそう