Programare swift Swift tutorial from tutorials point | Page 12

Swift 4 Class Implementations of Protocol Initializer Requirements ............................................................... 196 Protocols as Types ............................................................................................................................... 197 Adding Protocol Conformance with an Extension................................................................................ 198 Protocol Inheritance ............................................................................................................................ 199 Class Only Protocols ............................................................................................................................ 201 Protocol Composition .......................................................................................................................... 202 Checking for Protocol Conformance .................................................................................................... 203 34. SWIFT 4 – GENERICS ........................................................................................................ 205 Generic Functions: Type Parameters ................................................................................................... 205 Extending a Generic Type .................................................................................................................... 207 Type Constraints ................................................................................................................................. 208 Associated Types ................................................................................................................................. 209 Where Clauses .................................................................................................................................... 211 35. SWIFT 4 – ACCESS CONTROL ........................................................................................... 213 Access Control for Function types ....................................................................................................... 213 Access Control for Enumeration types ................................................................................................. 214 Access Control for SubClasses ............................................................................................................. 215 Access Control for Constants, variables, properties and subscripts ..................................................... 215 Getters and Setters ............................................................................................................................. 216 Access Control for Initializers and Default Initializers .......................................................................... 216 Access Control for Protocols ................................................................................................................ 217 Access Control for Extensions .............................................................................................................. 218 Access Control for Generics ................................................................................................................. 218 Access Control for Type Aliases ........................................................................................................... 219 Swift Encoding and Decoding .............................................................................................................. 222 xi