Made ViewController of example project work with simulator with undeprecated methods.