Type variable in protocol - Swift 2
问题 So I have a protocol, and in it I want a variable that is a class type. That way I can init that class from the variable. Keep in mind that there will be many different classes. I made a quick example. I get the error "type 'CashRegister' does not conform to protocol 'RegisterProtocol'" This example isn't exactly what I'm doing, but it gets the point across. Thanks for the help. protocol RegisterProtocol { var currentBill: DollarBillProtocol {get set} func makeNewBill()->DollarBillProtocol }