Assuming the ground is flat, no air resistance, and the bullet is fired at coordinates (0, 0), the formula for height as a function of distance travelled along the ground is as follows:
a = launch angle
v = launch speed
x = distance travelled along the ground
y = distance above the ground
g = acceleration due to gravity.
y(x) = (x * tan(a)) - ( ( (g / ( cos(a) * cos(a) ) ) / (2 * v * v) ) * (x * x) )
Check what units your maths/trigonometry library uses for angles (degrees or radians)
So, assuming the bullet is moving in +ve x direction, plot (0, y(0)), (1, y(1)), (2, y(2)) etc. until y(x) is < 0, meaning that the bullet has hit the ground.
(Don't forget to add 512 to x, and 10 to y when plotting, to match the start point at your gun sprite position).
Here endeth the maths lesson. Over to you on the iPad code.
If you want to get really fancy, the Wikipedia Trajectory page is fairly thorough.