mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Various Fixes
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
self = [super initWithFrame:frame];
|
||||
if (self != nil)
|
||||
{
|
||||
self.adjustsImageWhenHighlighted = false;
|
||||
self.modernHighlight = false;
|
||||
self.exclusiveTouch = true;
|
||||
self.backgroundColor = [TGCameraInterfaceAssets buttonColor];
|
||||
self.layer.cornerRadius = 24.0;
|
||||
@@ -19,6 +21,16 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)_setHighligtedAnimated:(bool)highlighted animated:(bool)animated {
|
||||
if (animated) {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.layer.sublayerTransform = highlighted ? CATransform3DMakeScale(0.9, 0.9, 1.0) : CATransform3DIdentity;
|
||||
}];
|
||||
} else {
|
||||
self.layer.sublayerTransform = highlighted ? CATransform3DMakeScale(0.9, 0.9, 1.0) : CATransform3DIdentity;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setHidden:(BOOL)hidden
|
||||
{
|
||||
self.alpha = hidden ? 0.0f : 1.0f;
|
||||
@@ -60,6 +72,8 @@
|
||||
self = [super initWithFrame:frame];
|
||||
if (self != nil)
|
||||
{
|
||||
self.adjustsImageWhenHighlighted = false;
|
||||
self.modernHighlight = false;
|
||||
self.exclusiveTouch = true;
|
||||
self.backgroundColor = [TGCameraInterfaceAssets buttonColor];
|
||||
self.layer.cornerRadius = 24.0;
|
||||
@@ -68,6 +82,16 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)_setHighligtedAnimated:(bool)highlighted animated:(bool)animated {
|
||||
if (animated) {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.layer.sublayerTransform = highlighted ? CATransform3DMakeScale(0.9, 0.9, 1.0) : CATransform3DIdentity;
|
||||
}];
|
||||
} else {
|
||||
self.layer.sublayerTransform = highlighted ? CATransform3DMakeScale(0.9, 0.9, 1.0) : CATransform3DIdentity;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setHidden:(BOOL)hidden
|
||||
{
|
||||
self.alpha = hidden ? 0.0f : 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user