InAppSettingsKit IASKCustomViewSpecifier
i am having trouble trying to call values from two IASKCustomViewSpecifier in the InAppSettingsKit. I tried changing the Key value from customCell but it seams to then change the dimensions of the customCell text field. They appear fine in the setting bundle in the simulator and the device how ever i just cant work out how to call each one independently
eg
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
oneString = [defaults objectForKey:@"customCellOne"];
twoString = [defa开发者_如何学Goults objectForKey:@"customCellTwo"];
Plist File contents
Item 0
-Title: One -Type: IASKCustomViewSpecifier -Key: customCell -DefaultValue: Test Example String hereItem 1
-Title: Two -Type: IASKCustomViewSpecifier -Key: customCell -DefaultValue: Test Example String here
Any help would be great,
thanks,
I think my answer over at Github solved the issue: https://github.com/futuretap/InAppSettingsKit/issues/closed#issue/43
I have figured out how to set different IASKCustomViewSpecifier cells. I changed the keys on them and they are all looking good now but the problem i am facing now is that when i get out of the settings bundle it doesnt save the changes I made on the IASKCustomViewSpecifier cell's all the others it works fine. I think it has something to do with this code
- (void)textViewDidChange:(UITextView *)textView {
[[NSUserDefaults standardUserDefaults] setObject:textView.text forKey:@"customCell"];
[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged object:@"customCell"];
}
Now that all the keys are different not sure what to do with the forKey@"customCell".
精彩评论