mirror of
https://github.com/gilshahar7/AVLock.git
synced 2025-06-28 00:46:45 +00:00
Version 1.0.3
Added a12 compatability. Fixed a bug where AVLock's button was overlapping.
This commit is contained in:
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
ARCHS = armv7 arm64
|
||||
|
||||
ARCHS = armv7 arm64 arm64e
|
||||
export TARGET = iphone:clang:11.2:7.0
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
|
||||
TWEAK_NAME = AVLock
|
||||
|
20
Tweak.xm
20
Tweak.xm
@ -21,7 +21,8 @@
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//#import <AudioToolbox/AudioToolbox.h>
|
||||
//#import <AudioToolbox/AudioServices.h>
|
||||
|
||||
extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void);
|
||||
|
||||
@ -96,13 +97,24 @@ CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
}
|
||||
|
||||
%end
|
||||
double delayInSeconds = 0.13;
|
||||
|
||||
|
||||
|
||||
%hook AVPlaybackControlsVisibilityControllerItem
|
||||
-(BOOL)wantsAnimatedTransitionToHidden:(BOOL)arg1 alpha:(double)arg2{
|
||||
if(!arg1){
|
||||
delayInSeconds = 0.0;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
//AudioServicesPlaySystemSound(1103);
|
||||
delayInSeconds = 0.13;
|
||||
}
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%hook AVTransportControlsView
|
||||
int test = 30;
|
||||
|
||||
|
||||
// iOS 12
|
||||
-(AVTransportControlsView *)initWithFrame:(CGRect)frame styleSheet:(id)arg2 captureView:(id)arg3{
|
||||
AVTransportControlsView *origself = %orig(frame,arg2,arg3);
|
||||
@ -178,7 +190,7 @@ int test = 30;
|
||||
|
||||
%new
|
||||
-(void)deviceOrientationDidChange{
|
||||
double delayInSeconds = 0.13;
|
||||
|
||||
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
|
||||
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
|
||||
|
||||
|
BIN
com.gilshahar7.avlock_1.0.3_iphoneos-arm.deb
Normal file
BIN
com.gilshahar7.avlock_1.0.3_iphoneos-arm.deb
Normal file
Binary file not shown.
Reference in New Issue
Block a user