diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b81bb60 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +INSTALL_TARGET_PROCESSES = SpringBoard + +include $(THEOS)/makefiles/common.mk + +TWEAK_NAME = ZenithDark + +ZenithDark_FILES = Tweak.x +ZenithDark_CFLAGS = -fobjc-arc + +include $(THEOS_MAKE_PATH)/tweak.mk diff --git a/Tweak.x b/Tweak.x new file mode 100644 index 0000000..57c7cc7 --- /dev/null +++ b/Tweak.x @@ -0,0 +1,37 @@ + +// Basically all of this was written by J.K. Hayslip, aka iKilledAppl3. He's a huge help, go follow him on twitter. + +// Idea by Cooper Hull, aka mac-user669. Thanks to iKA for the help! + +//––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––\\ + +// We make an interface to let Theos know that ZNGrabberAccessoryView is of type UIImageView; +@interface ZNGrabberAccessoryView : UIImageView +@end + + +// We then import UIKit so we can override the color property without this Theos doesn't have a clue what those properties are. +@import UIKit; + + +//We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView” +%hook ZNGrabberAccessoryView +// The method we then modify is this method that is called from UIImageView to set the backgroundColor of the image view. +// Since the grabber view is of type UIImageView we can modify this method :) + +-(void)setBackgroundColor:(UIColor *)backgroundColor { + //Call the original function then pass our custom argument to the backgroundColor argument as shown below. + %orig([UIColor colorWithWhite:0.0 alpha:0.44]); + +} + +// We need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P +%end + +// Our constructor +%ctor { + +// We use this to make sure we load Zenith's dynamic library at runtime so we can modify it with our tweak. +dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW); + +} \ No newline at end of file diff --git a/ZenithDark.plist b/ZenithDark.plist new file mode 100644 index 0000000..10dc654 --- /dev/null +++ b/ZenithDark.plist @@ -0,0 +1 @@ +{ Filter = { Bundles = ( "com.apple.springboard" ); }; } diff --git a/control b/control new file mode 100644 index 0000000..75a5a75 --- /dev/null +++ b/control @@ -0,0 +1,9 @@ +Package: com.mac-user669.zenithdark +Name: ZenithDark +Depends: mobilesubstrate +Version: 0.0.1 +Architecture: iphoneos-arm +Description: An awesome MobileSubstrate tweak! +Maintainer: mac-user669 +Author: mac-user669 +Section: Tweaks diff --git a/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb b/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb new file mode 100644 index 0000000..a7d8d97 Binary files /dev/null and b/packages/com.mac-user669.zenithdark_0.0.1-1+debug_iphoneos-arm.deb differ diff --git a/packages/com.mac-user669.zenithdark_0.0.1_iphoneos-arm.deb b/packages/com.mac-user669.zenithdark_0.0.1_iphoneos-arm.deb new file mode 100644 index 0000000..599c68f Binary files /dev/null and b/packages/com.mac-user669.zenithdark_0.0.1_iphoneos-arm.deb differ