- submit sample codes with iOS 8 beta

modify sample code to support new iOS 8 API trait collection