#Swift #associatedtype 요 며칠 프레임워크 자체를 다루는데 집중하느라 본의아니게 계속 외면해왔던 친구가 있습니다. 걔가 바로 오늘 다룰 associatedtype 입니다.
최근 다루던 프로토콜에서 계속 나왔지만 이악물고 외면하다가 이제야 마주합니다..ㅋㅋ 스위프트 공식문서를 보면서 차근차근 살펴볼게요. https://docs.swift.org/swift-book/LanguageGuide/Generics.html Generics — The Swift Programming Language (Swift 5.7) The Problem That Generics Solve Here’s a standard, nongeneric function called swapTwoInts(_:_:) , which swaps two Int values: func swapTwoInts ( _ a : inout Int , _ b : inout Int ) { let temporaryA = a a ...
#
associatedtype
#
Swift
원문 링크 : [Swift] Associated Types