GSCapability

From iPhone Development Wiki
Revision as of 15:37, 3 October 2009 by KennyTM~ (talk | contribs) (Created page with '{{occlass|library=GraphicsServices.framework}} GSCapability is a group of C functions that checks the ''capability'' of the device. A capability can be a simple boolean valu…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


GSCapability is a group of C functions that checks the capability of the device. A capability can be a simple boolean value, e.g. whether the device can take pictures, to a complex structure e.g. the screen dimensions.

Example code

if (GSSystemHasCapability(kGSMagnetometerCapability)) {
  direction = get_direction();
} else {
  printf("This device has no compass\n");
}

Header