摘要:
E文:https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Generics.html associatedtype用于protocol中 assoc 阅读全文
摘要:
本文转载自:http://blog.csdn.net/sinat_27706697/article/details/47122137 感谢作者:秋恨雪 通常情况下,我们在使用数组(Array)或字典(Dictionary)时会使用到下标。其实在Swift中,我们还可以给类、结构、枚举等自定义下标(s 阅读全文
摘要:
转载自:http://www.jianshu.com/p/14cc9d30770a 感谢作者:此ID想了很久 Swift中protocol的功能比OC中强大很多,不仅能再class中实现,同时也适用于struct、enum。使用 mutating 关键字修饰方法是为了能在该方法中修改 struct 阅读全文