sparkdev97 / libsparkcolourpicker Goto Github PK
View Code? Open in Web Editor NEWSpark's Colour Picker Library
License: Do What The F*ck You Want To Public License
Spark's Colour Picker Library
License: Do What The F*ck You Want To Public License
I'm working on integrating libSparkColourPicker into my tweak, but I can only get the SparkColourPickerCell to show if I have another tweak that depends on libSparkColourPicker installed. For example: If I install my tweak (ZenithDark), and make sure libSparkColourPicker is installed, the cell where the color picker should be shows up looking like a cell that is used for multi-page prefs (See first attached screenshot). However, when I install a tweak that utilizes libSparkColourPicker, it works fine (See second screenshot). I can't figure out why this is happening!
I've double checked that it's not another tweak messing with it, so I'm not sure what to do now.
Thanks!
Error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SparkColourPickerUtils", referenced from:
objc-class-ref in Tweak.xm.b1b545ed.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm trying to make a switch that controls whether or not my tweak should use a custom color, and my code looks something like this:
`-(void)setBackgroundColor:(UIColor *)backgroundColor {
NSString* colourString = NULL;
NSDictionary* preferencesDictionary = [NSDictionary dictionaryWithContentsOfFile: @"/var/mobile/Library/Preferences/com.mac-user669.zenithdark.plist"];
if(preferencesDictionary)
{
colourString = [preferencesDictionary objectForKey: @"aColorOfMine"];
}
UIColor* selectedColour = [SparkColourPickerUtils colourWithString: colourString withFallback: @"#FF00FF"];
if (@available(iOS 13, *)) {
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
if (kCustomDarkColorEnabled) {
%orig(selectedColour);
}
else {
%orig([UIColor blueColor]);
}
}
else {
%orig;
}
}
}`
Everything works fine until I turn off kCustomDarkColorEnabled and respring, and then the color goes back to the fallback color. What am I doing wrong?
Thanks!
Edit: To clarify, the SparkColourPicker's color gets totally removed from the preference file
Please make LSColourPicker for iOS 14. Thanks!!
(on iOS 14 if you use colour picker and click any slider or any colour it crashes that app)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.