change the methods that deprecate in ios6