Created
February 9, 2024 01:52
Make Dynamic Island transparent with custom background color
This file contains hidden or 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