Fix for methods that are deprectated

Hi,

I fixed the use of methods that are deprecated in iOS 7.0