Jump to content

Astronaut

Senior Member
  • Posts

    163
  • Joined

  • Last visited

Everything posted by Astronaut

  1. I am trying to use a void and make a switch to turn it off or on. I am not trying to return a void as a bool or id. I am simply trying to return it %orig. Example: %hook Play -(void) disableIfWatching { if(GetPrefBool (@"test")) { return %orig; } return %orig; } %end %ctor { %init(Play = objc_getClass("Hydra.WatchController")); } I have compiled it and work only when the switch is off which is the problem. I'd like it to work like a normal switch when it's on. Example of .plist: <dict> <key>action</key> <string>info</string> <key>cell</key> <string>PSSwitchCell</string> <key>default</key> <false/> <key>defaults</key> <string>test.com</string> <key>key</key> <string>test</string> <key>label</key> <string>Testing Void Switch</string> </dict> Yes, the void does do something which is why I'd like to make it work with my preferencebundle. I have tested in Flex and it does void whatever it is supposed to do. Edit: When I remove the second %orig; from tweak.xm, it work but when the switch is off. When both %orig; are in tweak.xm, the switch doesn't work at all.
  2. will try this soon. i will let you know. theres also this: %hook UIButton - (void)setTextColor:(UIColor *)color { %orig([UIColor whiteColor]); } %end
  3. I am trying to write a UIColor in my tweak.xm. -(void) setBackgroundColor:(id)arg1 { arg1 = ; return %orig; } %end UIColor is Red:26, Green:26, Blue 26
  4. I bought and it works fine on 10.1.1. It also says it works on 10.2 on the official repo.
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines