This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol MyProtocol { | |
| var myName: String { get } | |
| init() | |
| } | |
| struct MyA: MyProtocol { | |
| var myName: String { | |
| return "My Name is A" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Address : Codable { | |
| var street: String | |
| var zipCode: String | |
| var city: String | |
| var state: String | |
| } | |
| struct AnyCodingKey : CodingKey { | |
| var stringValue: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ViewController: UIViewController { | |
| enum ImageViewState: Int { | |
| case open | |
| case close | |
| var opposite: ImageViewState { | |
| switch self { | |
| case .open: | |
| return .close |
OlderNewer