但願看完此文後,你對本身Swift繼續保持信心api
Swift 內功勸退篇 : mp.weixin.qq.com/s/U95QmOOje…bash
要是誰能一口氣讀下來,可謂大成app
ExpressibleByDictionaryLiteral
Sequence
Collection
CustomStringConvertible
Hashable
Codable
Comparable
RangeReplaceableCollection
以上協議常見應用場景是什麼,有什麼做用?函數
閱讀如下代碼,print 輸出什麼ui
@propertyWrapper
struct Wrapper<T> {
var wrappedValue: T
var projectedValue: Wrapper<T> { return self }
func foo() { print("Foo") }
}
struct HasWrapper {
@Wrapper var x = 0
func foo() {
print(x) // `wrappedValue`
print(_x) // wrapper type itself
print($x) // `projectedValue`
}
}
複製代碼
public
open
final
static
class
mutating
inout
infix operator
@dynamicMemberLookup
where
@dynamicCallable
@autoclosure
@escaping
以上關鍵字使用場景是什麼?spa
有何異同?code
柯里化
什麼意思POP
與 OOP
的區別Any
與AnyObject
區別rethrows
和 throws
有什麼區別呢?break
return
continue
fallthough
在語句中的含義(switch、while、for)