Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 709 Bytes

Experimental Approaches.md

File metadata and controls

44 lines (39 loc) · 709 Bytes
// Experimental Notes.app 

%hook UIToolbar
-(void)setTintColor:(id)arg1
{
    if (isCurrentApp(@"com.apple.mobilenotes")) {
            arg1 = newColor;
    }
    %orig;
}
%end

%hook UINavigationBar
-(void)layoutSubviews
{
    %orig;
    if (isCurrentApp(@"com.apple.mobilenotes")) {
            self.tintColor = newColor;
    }
}
%end

%hook UIImageView
-(void)layoutSubviews
{
    %orig;
    if (isCurrentApp(@"com.apple.mobilenotes")) {
            self.tintColor = newColor;
    }
}

// Side effect: themes even the keyboard in Notes

-(UIColor *)tintColor
{
    if (isCurrentApp(@"com.apple.mobilenotes")) {
            return newColor;
    } else {
        return %orig;
    }
}
%end