summaryrefslogtreecommitdiffstats
path: root/platform/iphone/app_delegate.h
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2016-11-13 22:11:00 +1100
committerBastiaanOlij <mux213@gmail.com>2017-01-12 16:34:42 +1100
commit5c13bae8dfbb3e4c2b67c0ec2177926079e78a2f (patch)
tree28a92184b67fabf4c56bf62d67b952ca7f15715e /platform/iphone/app_delegate.h
parent5afaf84ae1406fd8d03887740c3d4a38fa5e2a29 (diff)
downloadredot-engine-5c13bae8dfbb3e4c2b67c0ec2177926079e78a2f.tar.gz
Replacing deprecated UIAccelerometer with Core Motion
Diffstat (limited to 'platform/iphone/app_delegate.h')
-rw-r--r--platform/iphone/app_delegate.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/iphone/app_delegate.h b/platform/iphone/app_delegate.h
index 09c401b329..3441dac6f3 100644
--- a/platform/iphone/app_delegate.h
+++ b/platform/iphone/app_delegate.h
@@ -30,11 +30,16 @@
#import "gl_view.h"
#import "view_controller.h"
-@interface AppDelegate : NSObject <UIApplicationDelegate, UIAccelerometerDelegate, GLViewDelegate> {
+// Old accelerometer approach deprecated since IOS 7.0
+// Include coremotion for accelerometer, gyroscope and magnetometer access, available since IOS 4.0 but some functionality won't work for anything before IOS 5.0
+#import <CoreMotion/CoreMotion.h>
+
+//@interface AppDelegate : NSObject <UIApplicationDelegate, UIAccelerometerDelegate, GLViewDelegate> {
+@interface AppDelegate : NSObject <UIApplicationDelegate, GLViewDelegate> {
//@property (strong, nonatomic) UIWindow *window;
ViewController* view_controller;
- UIAccelerationValue accel[3];
- UIAccelerationValue last_accel[3];
+// UIAccelerationValue accel[3];
+// UIAccelerationValue last_accel[3];
};
@property (strong, nonatomic) UIWindow *window;