fix iPhone and iPad detection.
Merge pull request #348 from Wellming/master

fix iPhone and iPad detection.