swift2.2 NO.5

////

protocol ExampleProtocol{

    var simpleDescription :String{get}

    mutating func adjust()

}

 

class SimpleClass:ExampleProtocol{

    

    var simpleDescription:String = "A very simple class."

    var anotherProperty:Int = 70106

    func adjust() {

     simpleDescription += "Now 100% adjusted"

    }

}

 

你可能感兴趣的:(swift2.2 NO.5)