You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing this in one of my tweak, and the picker specifiers are dynamically enabled and disabled based on a switch. Every time the switch is toggled, last picker (it consist of three pickers in prefs) will pop-up. I'm not sure is this issue occurs because of how I implement it, or it's on how Alderis' implementation. Sample code:
In RootListController.m:
- (NSArray *)specifiers {
if (!_specifiers) {
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
NSArray *pickerCell = @[@"picker1", @"picker2",@"picker3"];
self.pickerSpecifiers = (!self.pickerSpecifiers) ? [[NSMutableDictionary alloc] init] : self.pickerSpecifiers ;
for(PSSpecifier *specifier in _specifiers) {
if([pickerCell containsObject:[specifier propertyForKey:@"tag"]]) {
[self.pickerSpecifiers setObject:specifier forKey:[specifier propertyForKey:@"tag"]];
}
}
}
return _specifiers;
}
- (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier{
[super setPreferenceValue:value specifier:specifier];
NSString *key = [specifier propertyForKey:@"key"];
if([key isEqualToString:@"theswitch"]) {
[(PSSpecifier *)self.pickerSpecifiers [@"picker1tag"] setProperty:value forKey:@"enabled"];
[self reloadSpecifier:(PSSpecifier *)self.pickerSpecifiers [@"pickertag1"] animated:NO]; //It should be this line caused the last picker to pop-up to due to the reloading
}
}
The text was updated successfully, but these errors were encountered:
I'm implementing this in one of my tweak, and the picker specifiers are dynamically enabled and disabled based on a switch. Every time the switch is toggled, last picker (it consist of three pickers in prefs) will pop-up. I'm not sure is this issue occurs because of how I implement it, or it's on how Alderis' implementation. Sample code:
In
RootListController.m
:The text was updated successfully, but these errors were encountered: