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
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| class Subscribe { | |
| func fetch1 (complition: () -> Void ) { | |
| // Api通信中.. | |
| print("1 loading...") | |
| complition() | |
| } |
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
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| protocol Delegate: class { | |
| func success(str: String, num: Int) -> String | |
| } | |
| // Modelだと思って | |
| class Subscribe { |
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
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| protocol Delegate: class { | |
| func foo() | |
| func bar(num: Int) | |
| func buz(str: String, num: Int) -> 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
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| // Observerを一括で管理するClass | |
| class MyNotificationManager { | |
| let center = NotificationCenter.default | |
| func setMyNotification(clazz: Observer) { |