Skip to content

PKDEVICE.formFactor

kerrishotts edited this page Nov 12, 2012 · 1 revision

(part of PKDEVICE)

Return Type: string

Returns: tablet, phone

Returns the form factor of the device. If the device is a phone (or similarly sized device), phone is returned. If the device is a tablet (or similarly sized device), tablet is returned.

Example:

PKDEVICE.formFactor();
// returns "tablet"

Notes

  • For iOS, phone is returned for all platforms except for the iPad, where tablet is returned.
  • For other platforms, if the width of the screen in either orientation is less than 1024, phone is returned. Otherwise tablet is returned.

Version

0.1 Introduced

0.2 Docs Valid

Clone this wiki locally