title: Detect if device is iOS
body: <p>I'm wondering if it's possible to detect whether a browser is running on iOS, similar to how you can feature detect with Modernizr (although this is obviously device detection rather than feature detection).</p>
  
  <p>Normally I would favour feature detection instead, but I need to find out whether a device is iOS because of the way they handle videos as per this question <a href="https://stackoverflow.com/questions/8972726/youtube-api-not-working-with-ipad-iphone-non-flash-device">YouTube API not working with iPad / iPhone / non-Flash device</a></p>