make orientation public

This commit is contained in:
Radu Popovici 2016-03-24 10:25:45 +02:00
parent 379f75d7a6
commit 5d98407e67
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,8 @@ typedef void (^RCTSensorCallback) (UIInterfaceOrientation orientation);
@interface RCTSensorOrientationChecker : NSObject
@property (assign, nonatomic) UIInterfaceOrientation orientation;
- (void)getDeviceOrientationWithBlock:(RCTSensorCallback)callback;
- (AVCaptureVideoOrientation)convertToAVCaptureVideoOrientation:(UIInterfaceOrientation)orientation;

View File

@ -13,7 +13,6 @@
@interface RCTSensorOrientationChecker ()
@property (strong, nonatomic) CMMotionManager * motionManager;
@property (assign, nonatomic) UIInterfaceOrientation orientation;
@property (strong, nonatomic) RCTSensorCallback orientationCallback;
@end
@ -33,6 +32,11 @@
return self;
}
- (void)dealloc
{
[self pause];
}
- (void)resume
{
__weak __typeof(self) weakSelf = self;