Przeglądaj źródła

Version 1.0.4

Added iOS 13 compatibility
master
Gil Shahar 5 lat temu
rodzic
commit
d4a5ff169e
Brak konta powiązanego z adresem e-mail autora
3 zmienionych plików z 32 dodań i 2 usunięć
  1. +30
    -0
      Tweak.xm
  2. +2
    -2
      control
  3. BIN
      packages/com.gilshahar7.avlock_1.0.4_iphoneos-arm.deb

+ 30
- 0
Tweak.xm Wyświetl plik

@@ -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{

+ 2
- 2
control Wyświetl plik

@@ -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 Wyświetl plik


Ładowanie…
Anuluj
Zapisz