iOS: fixed compiler warning about deprecated methods.