Sample code of WWDC 2012