-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include $(THEOS)/makefiles/common.mk | ||
|
||
TWEAK_NAME = VB9AppKit | ||
VB9AppKit_FILES = Tweak.xm | ||
VB9AppKit_LIBRARIES = objcipc | ||
|
||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
|
||
after-install:: | ||
install.exec "killall -9 SpringBoard" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* vb9appkit/Tweak.h | ||
* VolumeBar9 | ||
* | ||
* Created by cgm616 | ||
* Copyright (c) 2016 cgm616. All rights reserved. | ||
*/ | ||
|
||
#import <libobjcipc/objcipc.h> | ||
// #import <UIKit/UIApplication+Private.h> | ||
#import <UIKit/UIKit.h> | ||
#import <UIKit/UIStatusBar.h> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* vb9appkit/Tweak.xm | ||
* VolumeBar9 | ||
* | ||
* Created by cgm616 | ||
* Copyright (c) 2016 cgm616. All rights reserved. | ||
*/ | ||
|
||
#import "Tweak.h" | ||
|
||
%hook UIApplication | ||
|
||
-(id)init { | ||
[OBJCIPC registerIncomingMessageFromSpringBoardHandlerForMessageName:@"me.cgm616.volumebar9.showing" handler:^NSDictionary *(NSDictionary *message) { | ||
UIStatusBar *statusBar = MSHookIvar<UIStatusBar *>([UIApplication sharedApplication], "_statusBar"); | ||
BOOL status = statusBar.hidden; | ||
statusBar.hidden = YES; | ||
|
||
NSDictionary *return_message = @{ | ||
@"statusBarHidden" : [NSNumber numberWithBool:status], | ||
@"currentOrientation" : [NSNumber numberWithLongLong:[[UIApplication sharedApplication] statusBarOrientation]], | ||
}; | ||
|
||
return return_message; | ||
}]; | ||
|
||
[OBJCIPC registerIncomingMessageFromSpringBoardHandlerForMessageName:@"me.cgm616.volumebar9.hiding" handler:^NSDictionary *(NSDictionary *message) { | ||
BOOL previousStatus = [message[@"statusBarHidden"] boolValue]; | ||
|
||
UIStatusBar *statusBar = MSHookIvar<UIStatusBar *>([UIApplication sharedApplication], "_statusBar"); | ||
statusBar.hidden = previousStatus; | ||
|
||
return nil; | ||
}]; | ||
|
||
return %orig; | ||
} | ||
|
||
%end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ Filter = { Bundles = ( "com.apple.UIKit" ); }; } |