mirror of
https://github.com/gilshahar7/AVLock.git
synced 2025-06-27 16:36:47 +00:00
Version 1.0.4
Added iOS 13 compatibility
This commit is contained in:
30
Tweak.xm
30
Tweak.xm
@ -114,6 +114,36 @@ double delayInSeconds = 0.13;
|
||||
%hook AVTransportControlsView
|
||||
int test = 30;
|
||||
|
||||
// iOS 13
|
||||
-(AVTransportControlsView *)initWithFrame:(CGRect)frame styleSheet:(id)arg2{
|
||||
AVTransportControlsView *origself = %orig(frame,arg2);
|
||||
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
(void*)myObserver,
|
||||
lockButton,
|
||||
CFSTR("avlock.lockButton"),
|
||||
NULL,
|
||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),
|
||||
(void*)myObserver,
|
||||
unlockButton,
|
||||
CFSTR("avlock.unlockButton"),
|
||||
NULL,
|
||||
CFNotificationSuspensionBehaviorDeliverImmediately);
|
||||
button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[button addTarget:self action:@selector(orientationButtonPressed) forControlEvents:UIControlEventTouchUpInside];
|
||||
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("avlock.firstUpdate"), (void*)myObserver, NULL, true);
|
||||
button.contentMode = UIViewContentModeScaleAspectFit;
|
||||
|
||||
button.imageEdgeInsets = UIEdgeInsetsMake(10, 10, 10, 10);
|
||||
|
||||
[self addSubview:button];
|
||||
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange) name:UIDeviceOrientationDidChangeNotification object:nil];
|
||||
|
||||
return origself;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// iOS 12
|
||||
-(AVTransportControlsView *)initWithFrame:(CGRect)frame styleSheet:(id)arg2 captureView:(id)arg3{
|
||||
|
4
control
4
control
@ -1,9 +1,9 @@
|
||||
Package: com.gilshahar7.avlock
|
||||
Name: AVLock
|
||||
Depends: mobilesubstrate
|
||||
Version: 1.0.1
|
||||
Version: 1.0.4
|
||||
Architecture: iphoneos-arm
|
||||
Description: Add an orientation lock button to the iOS 11 stock video player
|
||||
Description: Add an orientation lock button to the stock iOS video player
|
||||
Maintainer: gilshahar7
|
||||
Author: gilshahar7
|
||||
Section: Tweaks
|
||||
|
BIN
packages/com.gilshahar7.avlock_1.0.4_iphoneos-arm.deb
Normal file
BIN
packages/com.gilshahar7.avlock_1.0.4_iphoneos-arm.deb
Normal file
Binary file not shown.
Reference in New Issue
Block a user