You probably already know about HTML5's
<input type="number">. Which if supported by a browser displays a form input optimized for inputting numbers. Whether that means an up/down spinner or an optimized keyboard.
However iOS' standard behavior for the number input isn't that ideal. By default iOS will display a standard keyboard slightly modified with a row of numbers at the top. This isn't ideal as you don't need the alphabetic keys and iOS already has a full numeric keypad it could use for the input instead. For reference, other mobile OS such as Android already display their numeric keypad when focusing a number input.
A html5doctor article article went over this, pointed out a trick by Chris Coyier using
<input type="text" pattern="[0-9]*"> in which the pattern forces iOS to use it's numeric keypad, and also mentioned HTML5's inputmode.