문제

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 = [defaults objectForKey:@"customCellTwo"];  

Plist File contents

Item 0
-Title: One
-Type: IASKCustomViewSpecifier
-Key: customCell
-DefaultValue: Test Example String here

Item 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".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top