Created
February 9, 2024 01:52
-
-
Save khanhduytran0/f4b133c715c96a10188012dd953a5f7d to your computer and use it in GitHub Desktop.
Make Dynamic Island transparent with custom background color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
// Make Dynamic Island transparent | |
@interface _SBGainMapView : UIView | |
@end | |
%hook _SBGainMapView | |
- (void)setFrame:(CGRect)frame { | |
%orig(frame); | |
self.hidden = YES; | |
} | |
%end | |
@interface SBSystemApertureViewController : UIViewController | |
@end | |
%hook SBSystemApertureViewController | |
- (void)viewWillAppear:(BOOL)animated { | |
%orig; | |
// You can set background color and transparency here | |
MSHookIvar<UIView *>(self, "_containerBackgroundParent").subviews[1].subviews[0].backgroundColor = [UIColor colorWithWhite:0 alpha:0.6]; | |
} | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment