One of the "hidden" themes of WWDC 2018 was algorithms. This talk looks at some of the sessions that talked about using algorithms to make better code and shows a toy example of using algorithms using UICollectionView animation.
• Swiftܕ ͱ FoundationܕͷؒʹϒϦοδ͕ඞཁͰ͢ɻ ίετO(1) ͔ΒO(n) Ͱ͢ɻ let story = “σοΧ͍ string" let text = NSMutableAttributedString(string: story) let string = text.string Session 229
ԕ͗ͨ͢ڮ let story = “σοΧ͍ string" let text = NSMutableAttributedString(string: story) let string = text.string as NSString for index in 1 ... { } let nsRange = string.range(of: “kitten")
γΣʔϓͷআ (V2) extension Canvas { mutating func deleteSelection() { var i = 0 while i < shapes.count { if shapes[i].isSelected { shapes.remove(at: i) } i += 1 } } }