📱 iOS Programming/Frameworks & Libraries (2) 썸네일형 리스트형 [Swift] Collection Types & Higher Order Functions [Collection Types] Array(Ordered)var someInts: [Int] = []// var someIntss: [[Int]] = Array(repeating:Array(repeating:0, count:5), count:5)// 5x5// var someIntss: [[Int]] = Array(repeating:[Int](), count:5)// 5x5// String을 제외하고는, subscript로 접근 가능var arr = [[1,2,3],[2,3],[4]]var flattenInts = arr.flatMap {$0} // 2차원 -> 1차원으로 병합 // return optional// Swift 4.1 부터 -> flatMap {$0} .compactMap {$0} // .. Dispatch Queue (Concurrency Control) Grand Central Dispatch (GCD): low-level API for managing concurrent operations. (Schedules threads in shared pool)= GCD is built on top of threads and manages a shared thread pool + decides which thread to execute them on.& GCD decides how much parallelism it requires based on the system and available system resources.* Doesn't work well in Simulators (CIDetector-x)* Attempting to synchronously .. 이전 1 다음