-
Notifications
You must be signed in to change notification settings - Fork 2
/
GMPVolumeView.xm
39 lines (32 loc) · 964 Bytes
/
GMPVolumeView.xm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Tweak.xm
* VolumeBar9
*
* Created by cgm616
* Copyright (c) 2016 cgm616. All rights reserved.
*/
#import "GMPVolumeView.h"
@implementation GMPVolumeView // new implementation of MPVolumeView to fix positioning issues
-(CGRect)volumeSliderRectForBounds:(CGRect)bounds {
CGRect newBounds=[super volumeSliderRectForBounds:bounds];
newBounds.origin.y=bounds.origin.y;
newBounds.size.height=bounds.size.height;
return newBounds;
}
-(CGRect)routeButtonRectForBounds:(CGRect)bounds {
CGRect newBounds=[super routeButtonRectForBounds:bounds];
newBounds.origin.y=bounds.origin.y;
newBounds.size.height=bounds.size.height;
return newBounds;
}
-(void)layoutSubviews {
[super layoutSubviews];
[self recursiveRemoveAnimationsOnView:self];
}
-(void)recursiveRemoveAnimationsOnView:(UIView *)view {
[view.layer removeAllAnimations];
for (UIView *subview in view.subviews) {
[self recursiveRemoveAnimationsOnView:subview];
}
}
@end