File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
swift-6-beta.docc/ReferenceManual Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -2420,19 +2420,18 @@ Swift 提供了以下 Interface Builder 特性:
2420
2420
应用 ` IBAction ` , ` IBSegueAction ` , ` IBOutlet ` ,
2421
2421
` IBDesignable ` , 或 ` IBInspectable ` 特性也意味着 ` objc ` 特性。
2422
2422
2423
- ## Type Attributes
2423
+ ## 类型特性
2424
2424
2425
- You can apply type attributes to types only.
2425
+ 您只能将类型特性应用于类型。
2426
2426
2427
2427
### autoclosure
2428
2428
2429
- Apply this attribute to delay the evaluation of an expression
2430
- by automatically wrapping that expression in a closure with no arguments.
2431
- You apply it to a parameter's type in a function or method declaration,
2432
- for a parameter whose type is a function type that takes no arguments
2433
- and that returns a value of the type of the expression.
2434
- For an example of how to use the ` autoclosure ` attribute,
2435
- see < doc:Closures#Autoclosures > and < doc:Types#Function-Type > .
2429
+ 将此特性应用于延迟表达式的求值,
2430
+ 通过自动将该表达式包装在一个没有参数的闭包中。
2431
+ 您将其应用于函数或方法声明中的参数类型,
2432
+ 适用于类型为不带参数且返回表达式类型值的函数类型的参数。
2433
+ 有关如何使用 ` autoclosure ` 特性的示例,
2434
+ 请参见文档:< doc:Closures#Autoclosures > 和文档:< doc:Types#Function-Type > 。
2436
2435
2437
2436
### convention
2438
2437
You can’t perform that action at this time.
0 commit comments