This example covers basic object oriented programming in Swift.
My Grandma has a cookie container... and nothing bad happens when I put two different types of cookies in it at the same time. And surely enough, I can even throw some rose petals in there too. Again, nothing bad happens... and the same can be true in Swift. We can create a container (an Array) which can contain any object. But when you grab an object out of the cookie container, you need to check what type of object it is before you eat it ;) In Swift this involves downcasting. You surely don't want to eat rose petals...
var cookieContainer: [AnyObject] = []
This project is part of Thinkful's course Intro to iOS Programming in Swift