Browse Source

Version 1.0.4

Added iOS 13 compatibility
master
Gil Shahar 4 years ago
parent
commit
d4a5ff169e
No account linked to committer's email address
3 changed files with 32 additions and 2 deletions
  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 View File

@@ -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 View File

@@ -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 View File


Loading…
Cancel
Save