Skip to content

Commit

Permalink
Fixes issue where iOS 8 survey "thank you" message was in off-screen …
Browse files Browse the repository at this point in the history
…position when in landscape

Orientation of the image/text (existing issue in all iOS versions) will be tracked elsewhere.
IOSOSX-20
  • Loading branch information
pkamb committed Mar 19, 2015
1 parent 5a13dde commit d1a3921
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ApptentiveConnect/source/Custom Views/ATHUDView.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ - (void)layoutSubviews {
}

self.bounds = CGRectIntegral(insetAllRect);
self.center = CGPointMake(floorf(parentWindow.center.x), floorf(parentWindow.center.y));

CGPoint centerPoint = parentWindow.center;
CGPoint orientationAdjustedCenterPoint = CGPointMake(MIN(centerPoint.x, centerPoint.y), MAX(centerPoint.x, centerPoint.y));

self.center = CGPointMake(floorf(orientationAdjustedCenterPoint.x), floorf(orientationAdjustedCenterPoint.y));

label.frame = CGRectIntegral(finalLabelRect);
icon.frame = CGRectIntegral(finalImageRect);
}
Expand Down

0 comments on commit d1a3921

Please sign in to comment.