, , , , , :)
, , - , JAVA, Objective-C - DiamondProblem
,
/ , ( Objective C), , Inheritance!!, , , super.methodname??? , ??? ?
, Protocols - , , .
: , , , , , , :) , ' t !!!
, , , . , - :)
protocol Test {
func test1()
}
extension Test {
func test1() {
print("Yo man")
}
}
protocol Test2 {
func test2()
}
extension Test2 {
func test2() {
print("Bye man")
}
}
class ViewController: UIViewController,Test,Test2 {
override func viewDidLoad() {
super.viewDidLoad()
self.test1()
self.test2()
}
}
, test1 test2, , :)
. , .
:
: Test1 Test2 , DiamondProblem, display(), ? 1 2?? Swift , display() self.display()
, , , ur, test1 test2, , test1.display() test2.display(), , thats , , ?
, Diamond :)