IOS Tilt Controls

I’m trying to create a game. It’s 2D. Lets say this game started off with a ball and you needed to tilt it and make it roll to the finish line, how would I make it so this ball moves which way you tilt. With realistic gravity?