You can never ever, override a "void". Just remember that.
And also, don't use "myvalue" it might not work in some cases. Though, you can use, "argument".
Here's some example:
%hook SomeClass
-(void)someMethod:(unsigned int)arguement {
if(GetPrefBool(@"k1")){
arguement = 100;
}
return %orig;
}
%end
--------------------------
One last thing, "void" can never be override as "null" whereas "null" is equivalent to 0 or none.
You can only use "null -> nil" and "%orig" to "(:id)"
Here's some example:
%hook SomeClass
-(void)someMethod:(id)arguement {
if(GetPrefBool(@"k1")){
arguement = %orig; <----- this identify as the ":(id)". "%orig" means 'return to original state' and "nil" means 'wipe the current value'.
}
return %orig; <----- this identify as the "-(void)"
}
%end