mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Roll back chat camera zoom
This commit is contained in:
parent
a2348148ff
commit
0add36f341
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
- (void)panGesture:(UIPanGestureRecognizer *)gestureRecognizer;
|
- (void)panGesture:(UIPanGestureRecognizer *)gestureRecognizer;
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame hasUltrawideCamera:(bool)hasUltrawideCamera hasTelephotoCamera:(bool)hasTelephotoCamera hasCenterRightZoom:(bool)hasCenterRightZoom minZoomLevel:(CGFloat)minZoomLevel maxZoomLevel:(CGFloat)maxZoomLevel secondMarkZoomValue:(CGFloat)secondMarkZoomValue;
|
- (instancetype)initWithFrame:(CGRect)frame hasUltrawideCamera:(bool)hasUltrawideCamera hasTelephotoCamera:(bool)hasTelephotoCamera minZoomLevel:(CGFloat)minZoomLevel maxZoomLevel:(CGFloat)maxZoomLevel;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ const NSInteger PGCameraFrameRate = 30;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (CGFloat)maxZoomLevel {
|
- (CGFloat)maxZoomLevel {
|
||||||
return MIN(64.0f, self.videoDevice.activeFormat.videoMaxZoomFactor);
|
return MIN(16.0f, self.videoDevice.activeFormat.videoMaxZoomFactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)resetZoom {
|
- (void)resetZoom {
|
||||||
@ -582,10 +582,10 @@ const NSInteger PGCameraFrameRate = 30;
|
|||||||
if (level < 1.0) {
|
if (level < 1.0) {
|
||||||
level = MAX(0.5, level);
|
level = MAX(0.5, level);
|
||||||
backingLevel = 1.0 + ((level - 0.5) / 0.5) * (firstMark - 1.0);
|
backingLevel = 1.0 + ((level - 0.5) / 0.5) * (firstMark - 1.0);
|
||||||
} else if (zoomLevel < self.secondMarkZoomValue) {
|
} else if (zoomLevel < 2.0) {
|
||||||
backingLevel = firstMark + ((level - 1.0) / (self.secondMarkZoomValue - 1.0)) * (secondMark - firstMark);
|
backingLevel = firstMark + ((level - 1.0) / 1.0) * (secondMark - firstMark);
|
||||||
} else {
|
} else {
|
||||||
backingLevel = secondMark + ((level - self.secondMarkZoomValue) / (self.maxMarkZoomValue - self.secondMarkZoomValue)) * (self.maxZoomLevel - secondMark);
|
backingLevel = secondMark + ((level - 2.0) / 6.0) * (self.maxZoomLevel - secondMark);
|
||||||
}
|
}
|
||||||
} else if (marks.count == 1) {
|
} else if (marks.count == 1) {
|
||||||
CGFloat mark = [marks.firstObject floatValue];
|
CGFloat mark = [marks.firstObject floatValue];
|
||||||
|
@ -2666,7 +2666,7 @@ static CGPoint TGCameraControllerClampPointToScreenSize(__unused id self, __unus
|
|||||||
case UIGestureRecognizerStateChanged:
|
case UIGestureRecognizerStateChanged:
|
||||||
{
|
{
|
||||||
CGFloat delta = (gestureRecognizer.scale - 1.0f) * 1.25;
|
CGFloat delta = (gestureRecognizer.scale - 1.0f) * 1.25;
|
||||||
if (_camera.zoomLevel > _camera.secondMarkZoomValue) {
|
if (_camera.zoomLevel > 2.0) {
|
||||||
delta *= 2.0;
|
delta *= 2.0;
|
||||||
}
|
}
|
||||||
CGFloat value = MAX(_camera.minZoomLevel, MIN(_camera.maxZoomLevel, _camera.zoomLevel + delta));
|
CGFloat value = MAX(_camera.minZoomLevel, MIN(_camera.maxZoomLevel, _camera.zoomLevel + delta));
|
||||||
|
@ -223,7 +223,7 @@
|
|||||||
_topPanelBackgroundView.backgroundColor = [TGCameraInterfaceAssets transparentPanelBackgroundColor];
|
_topPanelBackgroundView.backgroundColor = [TGCameraInterfaceAssets transparentPanelBackgroundColor];
|
||||||
[_topPanelView addSubview:_topPanelBackgroundView];
|
[_topPanelView addSubview:_topPanelBackgroundView];
|
||||||
|
|
||||||
_zoomModeView = [[TGCameraZoomModeView alloc] initWithFrame:CGRectMake(floor((frame.size.width - 172.0) / 2.0), frame.size.height - _bottomPanelHeight - _bottomPanelOffset - 18 - 43, 172, 43) hasUltrawideCamera:hasUltrawideCamera hasTelephotoCamera:hasTelephotoCamera hasCenterRightZoom:true minZoomLevel:hasUltrawideCamera ? 0.5 : 1.0 maxZoomLevel:camera.maxMarkZoomValue secondMarkZoomValue:camera.secondMarkZoomValue];
|
_zoomModeView = [[TGCameraZoomModeView alloc] initWithFrame:CGRectMake(floor((frame.size.width - 129.0) / 2.0), frame.size.height - _bottomPanelHeight - _bottomPanelOffset - 18 - 43, 129, 43) hasUltrawideCamera:hasUltrawideCamera hasTelephotoCamera:hasTelephotoCamera minZoomLevel:hasUltrawideCamera ? 0.5 : 1.0 maxZoomLevel:8.0];
|
||||||
_zoomModeView.zoomChanged = ^(CGFloat zoomLevel, bool done, bool animated) {
|
_zoomModeView.zoomChanged = ^(CGFloat zoomLevel, bool done, bool animated) {
|
||||||
__strong TGCameraMainPhoneView *strongSelf = weakSelf;
|
__strong TGCameraMainPhoneView *strongSelf = weakSelf;
|
||||||
if (strongSelf == nil)
|
if (strongSelf == nil)
|
||||||
@ -642,7 +642,7 @@
|
|||||||
|
|
||||||
[UIView animateWithDuration:0.2 delay:0.0 options:7 << 16 animations:^{
|
[UIView animateWithDuration:0.2 delay:0.0 options:7 << 16 animations:^{
|
||||||
CGFloat offset = hidden ? 19 : 18 + 43;
|
CGFloat offset = hidden ? 19 : 18 + 43;
|
||||||
_zoomModeView.frame = CGRectMake(floor((self.bounds.size.width - 172.0) / 2.0), self.bounds.size.height - _bottomPanelHeight - _bottomPanelOffset - offset, 172, 43);
|
_zoomModeView.frame = CGRectMake(floor((self.bounds.size.width - 129.0) / 2.0), self.bounds.size.height - _bottomPanelHeight - _bottomPanelOffset - offset, 129, 43);
|
||||||
} completion:nil];
|
} completion:nil];
|
||||||
|
|
||||||
[UIView animateWithDuration:0.25 animations:^
|
[UIView animateWithDuration:0.25 animations:^
|
||||||
@ -688,7 +688,7 @@
|
|||||||
_topFlipButton.alpha = alpha;
|
_topFlipButton.alpha = alpha;
|
||||||
|
|
||||||
CGFloat offset = hidden ? 19 : 18 + 43;
|
CGFloat offset = hidden ? 19 : 18 + 43;
|
||||||
_zoomModeView.frame = CGRectMake(floor((self.bounds.size.width - 172.0) / 2.0), self.bounds.size.height - _bottomPanelHeight - _bottomPanelOffset - offset, 172, 43);
|
_zoomModeView.frame = CGRectMake(floor((self.bounds.size.width - 129.0) / 2.0), self.bounds.size.height - _bottomPanelHeight - _bottomPanelOffset - offset, 129, 43);
|
||||||
|
|
||||||
if (hasDoneButton)
|
if (hasDoneButton)
|
||||||
{
|
{
|
||||||
|
@ -233,19 +233,16 @@
|
|||||||
{
|
{
|
||||||
CGFloat _minZoomLevel;
|
CGFloat _minZoomLevel;
|
||||||
CGFloat _maxZoomLevel;
|
CGFloat _maxZoomLevel;
|
||||||
CGFloat _secondMarkZoomValue;
|
|
||||||
|
|
||||||
UIView *_backgroundView;
|
UIView *_backgroundView;
|
||||||
|
|
||||||
bool _hasUltrawideCamera;
|
bool _hasUltrawideCamera;
|
||||||
bool _hasTelephotoCamera;
|
bool _hasTelephotoCamera;
|
||||||
bool _hasCenterRightZoom;
|
|
||||||
|
|
||||||
bool _beganFromPress;
|
bool _beganFromPress;
|
||||||
|
|
||||||
TGCameraZoomModeItemView *_leftItem;
|
TGCameraZoomModeItemView *_leftItem;
|
||||||
TGCameraZoomModeItemView *_centerItem;
|
TGCameraZoomModeItemView *_centerItem;
|
||||||
TGCameraZoomModeItemView *_centerRightItem;
|
|
||||||
TGCameraZoomModeItemView *_rightItem;
|
TGCameraZoomModeItemView *_rightItem;
|
||||||
|
|
||||||
bool _lockedOn;
|
bool _lockedOn;
|
||||||
@ -254,17 +251,15 @@
|
|||||||
|
|
||||||
@implementation TGCameraZoomModeView
|
@implementation TGCameraZoomModeView
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame hasUltrawideCamera:(bool)hasUltrawideCamera hasTelephotoCamera:(bool)hasTelephotoCamera hasCenterRightZoom:(bool)hasCenterRightZoom minZoomLevel:(CGFloat)minZoomLevel maxZoomLevel:(CGFloat)maxZoomLevel secondMarkZoomValue:(CGFloat)secondMarkZoomValue
|
- (instancetype)initWithFrame:(CGRect)frame hasUltrawideCamera:(bool)hasUltrawideCamera hasTelephotoCamera:(bool)hasTelephotoCamera minZoomLevel:(CGFloat)minZoomLevel maxZoomLevel:(CGFloat)maxZoomLevel
|
||||||
{
|
{
|
||||||
self = [super initWithFrame:frame];
|
self = [super initWithFrame:frame];
|
||||||
if (self != nil)
|
if (self != nil)
|
||||||
{
|
{
|
||||||
_hasUltrawideCamera = hasUltrawideCamera;
|
_hasUltrawideCamera = hasUltrawideCamera;
|
||||||
_hasTelephotoCamera = hasTelephotoCamera;
|
_hasTelephotoCamera = hasTelephotoCamera;
|
||||||
_hasCenterRightZoom = hasCenterRightZoom;
|
|
||||||
_minZoomLevel = minZoomLevel;
|
_minZoomLevel = minZoomLevel;
|
||||||
_maxZoomLevel = maxZoomLevel;
|
_maxZoomLevel = maxZoomLevel;
|
||||||
_secondMarkZoomValue = secondMarkZoomValue;
|
|
||||||
|
|
||||||
_backgroundView = [[UIView alloc] initWithFrame:self.bounds];
|
_backgroundView = [[UIView alloc] initWithFrame:self.bounds];
|
||||||
_backgroundView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.15];
|
_backgroundView.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.15];
|
||||||
@ -276,10 +271,7 @@
|
|||||||
_centerItem = [[TGCameraZoomModeItemView alloc] initWithFrame:CGRectMake(43, 0, 43, 43)];
|
_centerItem = [[TGCameraZoomModeItemView alloc] initWithFrame:CGRectMake(43, 0, 43, 43)];
|
||||||
[_centerItem addTarget:self action:@selector(centerPressed) forControlEvents:UIControlEventTouchUpInside];
|
[_centerItem addTarget:self action:@selector(centerPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
_centerRightItem = [[TGCameraZoomModeItemView alloc] initWithFrame:CGRectMake(86, 0, 43, 43)];
|
_rightItem = [[TGCameraZoomModeItemView alloc] initWithFrame:CGRectMake(86, 0, 43, 43)];
|
||||||
[_centerRightItem addTarget:self action:@selector(centerRightPressed) forControlEvents:UIControlEventTouchUpInside];
|
|
||||||
|
|
||||||
_rightItem = [[TGCameraZoomModeItemView alloc] initWithFrame:CGRectMake(129, 0, 43, 43)];
|
|
||||||
[_rightItem addTarget:self action:@selector(rightPressed) forControlEvents:UIControlEventTouchUpInside];
|
[_rightItem addTarget:self action:@selector(rightPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
[self addSubview:_backgroundView];
|
[self addSubview:_backgroundView];
|
||||||
@ -287,10 +279,6 @@
|
|||||||
if (hasTelephotoCamera && hasUltrawideCamera) {
|
if (hasTelephotoCamera && hasUltrawideCamera) {
|
||||||
[self addSubview:_leftItem];
|
[self addSubview:_leftItem];
|
||||||
[self addSubview:_rightItem];
|
[self addSubview:_rightItem];
|
||||||
|
|
||||||
if (hasCenterRightZoom) {
|
|
||||||
[self addSubview:_centerRightItem];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGesture:)];
|
UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGesture:)];
|
||||||
@ -353,13 +341,13 @@
|
|||||||
CGFloat previousLevel = _zoomLevel;
|
CGFloat previousLevel = _zoomLevel;
|
||||||
|
|
||||||
CGFloat delta = -translation.x / 60.0;
|
CGFloat delta = -translation.x / 60.0;
|
||||||
if (_zoomLevel > _secondMarkZoomValue) {
|
if (_zoomLevel > 2.0) {
|
||||||
delta *= 3.5;
|
delta *= 3.5;
|
||||||
}
|
}
|
||||||
CGFloat newLevel = MAX(_minZoomLevel, MIN(_maxZoomLevel, _zoomLevel + delta));
|
CGFloat newLevel = MAX(_minZoomLevel, MIN(_maxZoomLevel, _zoomLevel + delta));
|
||||||
|
|
||||||
CGFloat near = floor(newLevel);
|
CGFloat near = floor(newLevel);
|
||||||
if (near <= _secondMarkZoomValue && ABS(newLevel - near) < 0.05 && previousLevel != near && translation.x < 15.0) {
|
if (near <= 2.0 && ABS(newLevel - near) < 0.05 && previousLevel != near && translation.x < 15.0) {
|
||||||
newLevel = near;
|
newLevel = near;
|
||||||
_lockedOn = true;
|
_lockedOn = true;
|
||||||
|
|
||||||
@ -417,20 +405,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)centerRightPressed {
|
- (void)rightPressed {
|
||||||
if (_zoomLevel != 2.0) {
|
if (_zoomLevel != 2.0) {
|
||||||
[self setZoomLevel:2.0 animated:true];
|
[self setZoomLevel:2.0 animated:true];
|
||||||
self.zoomChanged(2.0, true, true);
|
self.zoomChanged(2.0, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)rightPressed {
|
|
||||||
if (_zoomLevel != _secondMarkZoomValue) {
|
|
||||||
[self setZoomLevel:_secondMarkZoomValue animated:true];
|
|
||||||
self.zoomChanged(_secondMarkZoomValue, true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setZoomLevel:(CGFloat)zoomLevel {
|
- (void)setZoomLevel:(CGFloat)zoomLevel {
|
||||||
[self setZoomLevel:zoomLevel animated:false];
|
[self setZoomLevel:zoomLevel animated:false];
|
||||||
}
|
}
|
||||||
@ -451,44 +432,21 @@
|
|||||||
[_centerItem setValue:value selected:false animated:animated];
|
[_centerItem setValue:value selected:false animated:animated];
|
||||||
}
|
}
|
||||||
[_rightItem setValue:@"2" selected:false animated:animated];
|
[_rightItem setValue:@"2" selected:false animated:animated];
|
||||||
} else if (zoomLevel < _secondMarkZoomValue) {
|
} else if (zoomLevel < 2.0) {
|
||||||
[_leftItem setValue:@"0,5" selected:false animated:animated];
|
[_leftItem setValue:@"0,5" selected:false animated:animated];
|
||||||
bool selected = _hasTelephotoCamera && _hasUltrawideCamera;
|
bool selected = _hasTelephotoCamera && _hasUltrawideCamera;
|
||||||
if ((zoomLevel - 1.0) < 0.025) {
|
if ((zoomLevel - 1.0) < 0.025) {
|
||||||
[_centerItem setValue:@"1×" selected:true animated:animated];
|
[_centerItem setValue:@"1×" selected:true animated:animated];
|
||||||
[_centerRightItem setValue:@"2" selected:false animated:animated];
|
|
||||||
} else {
|
|
||||||
if (_centerRightItem != nil) {
|
|
||||||
if (zoomLevel >= 2.0) {
|
|
||||||
[_centerItem setValue:@"1" selected:false animated:animated];
|
|
||||||
|
|
||||||
NSString *value = [NSString stringWithFormat:@"%.1f×", zoomLevel];
|
|
||||||
value = [value stringByReplacingOccurrencesOfString:@"." withString:@","];
|
|
||||||
value = [value stringByReplacingOccurrencesOfString:@",0×" withString:@"×"];
|
|
||||||
|
|
||||||
NSString *markValue = [NSString stringWithFormat:@"%d×", (int)_secondMarkZoomValue];
|
|
||||||
NSString *lowerMarkValue = [NSString stringWithFormat:@"%d.9×", (int)_secondMarkZoomValue - 1];
|
|
||||||
if ([value isEqual:markValue]) {
|
|
||||||
value = lowerMarkValue;
|
|
||||||
}
|
|
||||||
[_centerRightItem setValue:value selected:selected animated:animated];
|
|
||||||
} else {
|
} else {
|
||||||
NSString *value = [NSString stringWithFormat:@"%.1f×", zoomLevel];
|
NSString *value = [NSString stringWithFormat:@"%.1f×", zoomLevel];
|
||||||
value = [value stringByReplacingOccurrencesOfString:@"." withString:@","];
|
value = [value stringByReplacingOccurrencesOfString:@"." withString:@","];
|
||||||
value = [value stringByReplacingOccurrencesOfString:@",0×" withString:@"×"];
|
value = [value stringByReplacingOccurrencesOfString:@",0×" withString:@"×"];
|
||||||
|
if ([value isEqual:@"2×"]) {
|
||||||
NSString *markValue = [NSString stringWithFormat:@"%d×", 2];
|
value = @"1,9×";
|
||||||
NSString *lowerMarkValue = [NSString stringWithFormat:@"%d.9×", 2 - 1];
|
|
||||||
if ([value isEqual:markValue]) {
|
|
||||||
value = lowerMarkValue;
|
|
||||||
}
|
}
|
||||||
[_centerItem setValue:value selected:selected animated:animated];
|
[_centerItem setValue:value selected:selected animated:animated];
|
||||||
}
|
}
|
||||||
} else {
|
[_rightItem setValue:@"2" selected:false animated:animated];
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[_rightItem setValue:[NSString stringWithFormat:@"%d", (int)_secondMarkZoomValue] selected:false animated:animated];
|
|
||||||
} else {
|
} else {
|
||||||
[_leftItem setValue:@"0,5" selected:false animated:animated];
|
[_leftItem setValue:@"0,5" selected:false animated:animated];
|
||||||
|
|
||||||
@ -497,9 +455,6 @@
|
|||||||
|
|
||||||
if (_rightItem.superview != nil) {
|
if (_rightItem.superview != nil) {
|
||||||
[_centerItem setValue:@"1" selected:false animated:animated];
|
[_centerItem setValue:@"1" selected:false animated:animated];
|
||||||
if (_centerRightItem != nil) {
|
|
||||||
[_centerRightItem setValue:@"2" selected:false animated:animated];
|
|
||||||
}
|
|
||||||
[_rightItem setValue:value selected:true animated:animated];
|
[_rightItem setValue:value selected:true animated:animated];
|
||||||
} else {
|
} else {
|
||||||
[_centerItem setValue:value selected:true animated:animated];
|
[_centerItem setValue:value selected:true animated:animated];
|
||||||
@ -543,24 +498,17 @@
|
|||||||
if (_leftItem.superview == nil && _rightItem.superview == nil) {
|
if (_leftItem.superview == nil && _rightItem.superview == nil) {
|
||||||
_backgroundView.frame = CGRectMake(43, 0, 43, 43);
|
_backgroundView.frame = CGRectMake(43, 0, 43, 43);
|
||||||
} else if (_leftItem.superview != nil && _rightItem.superview == nil) {
|
} else if (_leftItem.superview != nil && _rightItem.superview == nil) {
|
||||||
_backgroundView.frame = CGRectMake(42 + TGScreenPixel, 0, 86, 43);
|
_backgroundView.frame = CGRectMake(21 + TGScreenPixel, 0, 86, 43);
|
||||||
_leftItem.frame = CGRectMake(42 + TGScreenPixel, 0, 43, 43);
|
_leftItem.frame = CGRectMake(21 + TGScreenPixel, 0, 43, 43);
|
||||||
_centerItem.frame = CGRectMake(42 + TGScreenPixel + 43, 0, 43, 43);
|
_centerItem.frame = CGRectMake(21 + TGScreenPixel + 43, 0, 43, 43);
|
||||||
} else if (_leftItem.superview == nil && _rightItem.superview != nil) {
|
} else if (_leftItem.superview == nil && _rightItem.superview != nil) {
|
||||||
_backgroundView.frame = CGRectMake(42 + TGScreenPixel, 0, 86, 43);
|
_backgroundView.frame = CGRectMake(21 + TGScreenPixel, 0, 86, 43);
|
||||||
_centerItem.frame = CGRectMake(42 + TGScreenPixel, 0, 43, 43);
|
_centerItem.frame = CGRectMake(21 + TGScreenPixel, 0, 43, 43);
|
||||||
_rightItem.frame = CGRectMake(42 + TGScreenPixel + 43, 0, 43, 43);
|
_rightItem.frame = CGRectMake(21 + TGScreenPixel + 43, 0, 43, 43);
|
||||||
} else if (_leftItem.superview != nil && _rightItem.superview != nil && _centerRightItem.superview == nil) {
|
|
||||||
_backgroundView.frame = CGRectMake(21 + TGScreenPixel, 0, 129, 43);
|
|
||||||
_leftItem.frame = CGRectMake(21 + TGScreenPixel, 0, 43, 43.0);
|
|
||||||
_centerItem.frame = CGRectMake(21 + TGScreenPixel + 43, 0, 43, 43.0);
|
|
||||||
_rightItem.frame = CGRectMake(21 + TGScreenPixel + 86, 0, 43, 43.0);
|
|
||||||
} else {
|
} else {
|
||||||
_backgroundView.frame = CGRectMake(0, 0, 172, 43);
|
|
||||||
_leftItem.frame = CGRectMake(0, 0, 43, 43.0);
|
_leftItem.frame = CGRectMake(0, 0, 43, 43.0);
|
||||||
_centerItem.frame = CGRectMake(43, 0, 43, 43.0);
|
_centerItem.frame = CGRectMake(43, 0, 43, 43.0);
|
||||||
_centerRightItem.frame = CGRectMake(86, 0, 43, 43.0);
|
_rightItem.frame = CGRectMake(86, 0, 43, 43.0);
|
||||||
_rightItem.frame = CGRectMake(129, 0, 43, 43.0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -569,7 +517,6 @@
|
|||||||
_interfaceOrientation = interfaceOrientation;
|
_interfaceOrientation = interfaceOrientation;
|
||||||
_leftItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
_leftItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
||||||
_centerItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
_centerItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
||||||
_centerRightItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
|
||||||
_rightItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
_rightItem.transform = CGAffineTransformMakeRotation(TGRotationForInterfaceOrientation(interfaceOrientation));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user