You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// make sure to use `dynamic` attribute for basic type & must use as Non-Optional & must set initial value
89
+
dynamicvar isSpecialAgent: Bool=false
90
+
dynamicvar age: Int=0
91
+
92
+
var name: String?
93
+
var identifier: String?
94
+
}
95
+
```
96
+
84
97
1.`@objc` or `@objcMembers` attributes should be added to class or property for declaration of Objc accessibility [在 Swift4 之后, 请在属性前加 `@objc` 修饰或在类前增加 `@objcMembers`. 以保证 Swift 的属性能够暴露给 Objc 使用. ]
85
98
2. If you let `Bool` & `Int` as property type, make sure that using `dynamic` to attribute it. It must be `Non-Optional` type and assign `a default value`.
0 commit comments