Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Commit

Permalink
Fix compiling issue related to UIDeviceOrientation
Browse files Browse the repository at this point in the history
  • Loading branch information
cybertk committed Aug 25, 2015
1 parent f0e37bc commit 9f86d45
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Classes/CardIOCameraView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,13 @@ - (UIInterfaceOrientation)defaultSupportedOverlayOrientation {
return UIInterfaceOrientationPortrait;
}
else {
UIInterfaceOrientation defaultOrientation = UIDeviceOrientationUnknown;
UIInterfaceOrientation defaultOrientation = UIInterfaceOrientationUnknown;
UIInterfaceOrientationMask supportedOverlayOrientationsMask = [self supportedOverlayOrientationsMask];
for (UIInterfaceOrientationMask orientation = UIInterfaceOrientationPortrait;
for (NSInteger orientation = UIInterfaceOrientationPortrait;
orientation <= UIInterfaceOrientationLandscapeRight;
orientation++) {
if ((supportedOverlayOrientationsMask & (1 << orientation)) != 0) {
defaultOrientation = orientation;
defaultOrientation = (UIInterfaceOrientation)orientation;
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/CardIOView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ - (void)successfulScan:(CardIOCreditCardInfo *)cardInfo {
if (deviceOrientation == UIDeviceOrientationFaceUp || deviceOrientation == UIDeviceOrientationFaceDown) {
deviceOrientation = (UIDeviceOrientation) vc.initialInterfaceOrientationForViewcontroller;
}
InterfaceToDeviceOrientationDelta delta = orientationDelta(UIDeviceOrientationPortrait, deviceOrientation);
InterfaceToDeviceOrientationDelta delta = orientationDelta(UIInterfaceOrientationPortrait, deviceOrientation);
CGFloat rotation = -rotationForOrientationDelta(delta); // undo the orientation delta
r = CGAffineTransformMakeRotation(rotation);
}
Expand Down
12 changes: 6 additions & 6 deletions Classes/CardIOViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,13 @@ - (UIInterfaceOrientation)defaultSupportedOverlayOrientation {
return UIInterfaceOrientationPortrait;
}
else {
UIInterfaceOrientation defaultOrientation = UIDeviceOrientationUnknown;
UIInterfaceOrientation defaultOrientation = UIInterfaceOrientationUnknown;
UIInterfaceOrientationMask supportedOverlayOrientationsMask = [self supportedOverlayOrientationsMask];
for (UIInterfaceOrientationMask orientation = UIInterfaceOrientationPortrait;
for (NSInteger orientation = UIInterfaceOrientationMaskPortrait;
orientation <= UIInterfaceOrientationLandscapeRight;
orientation++) {
if ((supportedOverlayOrientationsMask & (1 << orientation)) != 0) {
defaultOrientation = orientation;
defaultOrientation = (UIInterfaceOrientation)orientation;
break;
}
}
Expand All @@ -416,7 +416,7 @@ - (BOOL)prefersStatusBarHidden {
}

- (UIStatusBarStyle) preferredStatusBarStyle {
return /*UIStatusBarStyleLightContent*/1;
return UIStatusBarStyleLightContent;
}

#pragma mark - Handle button taps
Expand All @@ -429,7 +429,7 @@ - (void)manualEntry:(id)sender {
CardIODataEntryViewController *manualEntryViewController = [[CardIODataEntryViewController alloc] initWithContext:self.context withStatusBarHidden:self.statusBarWasOriginallyHidden];
manualEntryViewController.manualEntry = YES;
root.currentViewControllerIsDataEntry = YES;
root.initialInterfaceOrientationForViewcontroller = (UIDeviceOrientation)self.deviceOrientation;
root.initialInterfaceOrientationForViewcontroller = (UIInterfaceOrientation)self.deviceOrientation;

if (iOS_8_PLUS) {
// The presentViewController:/dismissViewControllerAnimated: kludge was necessary for
Expand Down Expand Up @@ -539,7 +539,7 @@ - (void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)

CardIOPaymentViewController *root = (CardIOPaymentViewController *)self.navigationController;
root.currentViewControllerIsDataEntry = YES;
root.initialInterfaceOrientationForViewcontroller = (UIDeviceOrientation)self.deviceOrientation;
root.initialInterfaceOrientationForViewcontroller = (UIInterfaceOrientation)self.deviceOrientation;

if (iOS_8_PLUS) {
// The presentViewController:/dismissViewControllerAnimated: kludge was necessary for
Expand Down

0 comments on commit 9f86d45

Please sign in to comment.