the code used on https://itunes.apple.com/us/course/developing-ios-7-apps-for/id733644550