iOS 7 deprecation warnings

A couple of methods used have been deprecated in iOS 7. The replacements, unfortunately, are not available in earlier versions. So I've used #if to build with the "old" version if the deployment target is less than iOS 7 and the "new" version otherwise.