Jump to content

Tweak, add 3 'boolean' to 1 key


Go to solution Solved by castix,

3 posts in this topic

Recommended Posts

Posted

Hey,

 

Sorry couldn't explain it well as title.

 

So, I'm making a tweak & I want to block ads, I know the boolean value's for it, I also know how to add them, but I want these 3 boolean value as 1 option in my tweak (settings tweak -> preference bundle)

 

I hope you do understand what I mean xD

 

Thanks if you can help

  • Solution
Posted
- (BOOL)someFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}

- (BOOL)someOtherFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}

- (BOOL)someVeryOtherFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}

The only key used will be "enabled"

Posted

 

- (BOOL)someFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}

- (BOOL)someOtherFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}

- (BOOL)someVeryOtherFunction {
    if(GetPrefBool(@"enabled")) {
    return YES;
    }
    %orig;
}
The only key used will be "enabled"

Ok thanks again dude!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • 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