SwiftUIとAppKitの連携

programming
2025
swift
novel
Author

Serika Yuzuki

Published

September 21, 2025

概要

SwiftUIとAppKitの連携での話。こいつらを繋げる際には、NSViewRepresentableというプロトコルを使うことになる。

Show Code
class number_class:
  a = 1
  def print_a(self):
    print(self.a)

a_class = number_class()
b_class = a_class
a_class.a = 2
b_class.print_a()
2
Back to top