mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
Add OnboardingKit shim method for uYou (iOS 16)
This commit is contained in:
parent
0fc9032979
commit
c1e3976200
2 changed files with 34 additions and 3 deletions
15
Header.h
15
Header.h
|
|
@ -9,7 +9,7 @@
|
|||
@end
|
||||
|
||||
// uYouPlus
|
||||
@interface YTMainAppControlsOverlayView: UIView
|
||||
@interface YTMainAppControlsOverlayView : UIView
|
||||
@end
|
||||
|
||||
@interface YTTransportControlsButtonView : UIView
|
||||
|
|
@ -19,6 +19,15 @@
|
|||
// @property (nonatomic, strong, readwrite) UIView *downloadsButton;
|
||||
// @end
|
||||
|
||||
@interface OBPrivacyLinkButton : UIButton
|
||||
- (instancetype)initWithCaption:(NSString *)caption
|
||||
buttonText:(NSString *)buttonText
|
||||
image:(UIImage *)image
|
||||
imageSize:(CGSize)imageSize
|
||||
useLargeIcon:(BOOL)useLargeIcon
|
||||
displayLanguage:(NSString *)displayLanguage;
|
||||
@end
|
||||
|
||||
// BigYTMiniPlayer
|
||||
@interface YTMainAppVideoPlayerOverlayView : UIView
|
||||
- (UIViewController *)_viewControllerForAncestor;
|
||||
|
|
@ -33,7 +42,7 @@
|
|||
@end
|
||||
|
||||
// OLED Darkmode
|
||||
@interface ASWAppSwitcherCollectionViewCell: UIView
|
||||
@interface ASWAppSwitcherCollectionViewCell : UIView
|
||||
@end
|
||||
|
||||
@interface ASScrollView : UIView
|
||||
|
|
@ -48,7 +57,7 @@
|
|||
@interface _ASDisplayView : UIView
|
||||
@end
|
||||
|
||||
@interface SponsorBlockSettingsController : UITableViewController
|
||||
@interface SponsorBlockSettingsController : UITableViewController
|
||||
@end
|
||||
|
||||
@interface SponsorBlockViewController : UIViewController
|
||||
|
|
|
|||
22
uYouPlus.xm
22
uYouPlus.xm
|
|
@ -622,6 +622,25 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
%end
|
||||
%end
|
||||
|
||||
// iOS 16 uYou crash fix
|
||||
%group iOS16
|
||||
%hook OBPrivacyLinkButton
|
||||
%new
|
||||
- (instancetype)initWithCaption:(NSString *)caption
|
||||
buttonText:(NSString *)buttonText
|
||||
image:(UIImage *)image
|
||||
imageSize:(CGSize)imageSize
|
||||
useLargeIcon:(BOOL)useLargeIcon {
|
||||
return [self initWithCaption:caption
|
||||
buttonText:buttonText
|
||||
image:image
|
||||
imageSize:imageSize
|
||||
useLargeIcon:useLargeIcon
|
||||
displayLanguage:[NSLocale currentLocale].languageCode];
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
# pragma mark - ctor
|
||||
%ctor {
|
||||
%init;
|
||||
|
|
@ -640,4 +659,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||
if (bigYTMiniPlayer() && (UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPad)) {
|
||||
%init(Main);
|
||||
}
|
||||
if (@available(iOS 16, *)) {
|
||||
%init(iOS16);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue