我有一个在Swift中的扩展(SCNVector3
),就像这样:
extension SCNVector3 {
// some functions extending SCNVector3 here....
}
我想将这个扩展转换为Objective-C。我知道在ObjC中扩展的等效物是“类别”,但似乎不可能在像
SCNVector3
这样的结构体上创建一个类别。
https://developer.apple.com/documentation/scenekit/scnvector3