update deprecated api call for ios6