Merge pull request #274 from googlegis/checkBranch

change haxArea to hasArea
This commit is contained in:
ChildhoodAndy
2014-07-17 10:07:32 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -573,7 +573,7 @@ wishHappyBirthday(birthdayPerson)
> 注意: `@objc`用来表示协议是可选的,也可以用来表示暴露给`Objective-C`的代码,此外,`@objc`型协议只对`类`有效,因此只能在`类`中检查协议的一致性。详情查看*[Using Siwft with Cocoa and Objectivei-c](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/index.html#//apple_ref/doc/uid/TP40014216)*。
如下所示,定义了`Circle``Country`类,它们都遵循了`haxArea`协议
如下所示,定义了`Circle``Country`类,它们都遵循了`HasArea`协议
```swift
class Circle: HasArea {
@ -588,7 +588,7 @@ class Country: HasArea {
}
```
`Circle`类把`area`实现为基于`存储型属性`radius的`计算型属性``Country`类则把`area`实现为`存储型属性`。这两个类都`遵循``haxArea`协议。
`Circle`类把`area`实现为基于`存储型属性`radius的`计算型属性``Country`类则把`area`实现为`存储型属性`。这两个类都`遵循``HasArea`协议。
如下所示Animal是一个没有实现`HasArea`协议的类

View File

@ -27,7 +27,7 @@
这里是一个标准的,非泛型函数`swapTwoInts`,用来交换两个Int值
```swift
func swapTwoInts(inout a: Int, inout b: Int)
func swapTwoInts(inout a: Int, inout b: Int) {
let temporaryA = a
a = b
b = temporaryA