Swift Talk Episode 32 Note
I watched Swift Talk episode 32, View Models at Kickstarter. The video demonstrates how to create View Model. The View Model is very well defined. Simple example, and very clear explanation!
The following is my note for it.
ArrayvsArraySlicesplit(batchSize:)function.Swift.min()- Use startIndex and endIndex.
ArraySliceis not guaranteed that it starts from index 0.stride()function requires that index is integer type, meaning type should beStrideable.Collectionprotocol doesn’t haveElementtype.Iterator.Element.Collection’s subscript returnSubsequencetype.- Use
IndexDistanceinstead ofIntforsplit(batchSize:)parameter. dump()function.