0 votes
79 views
asked by
Hi

  i am always getting  0 in the ios orientation?
commented by (8.2k points)
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

1 Answer

0 votes
answered by (8.2k points)

The value of this property always returns 0 unless orientation notifications have been enabled by callingbeginGeneratingDeviceOrientationNotifications.

You must call this method before attempting to get orientation data from the receiver. This method enables the device’s accelerometer hardware and begins the delivery of acceleration events to the receiver.

Categories

...