Implementing CollectionType in Swift 2.x
I ran into trouble with custom collections the other day and wondered how to reliably find out what the bare minimum for a custom CollectionType
is. The compiler will only help a bit: It’s conforming to neither CollectionType
nor SequenceType
. Now I know SequenceType
requires the generate()
method – but don’t let this fool you. CollectionType
will provide that for you if you meet its requirements.
Segues: How to Use Them While Saving Lines of Code
In “What’s New in Storyboards” of WWDC 2015, we’re presented with implementations of unwind segues. Now I’ve stated part of my concerns with segues and app architecture already. The sample code was very straight to the point: