Thread: Boolean Problems
-
12-30-2011, 08:12 AM #1
Boolean Problems
Hi i need help to read and edit a boolean value in object c. how can i do that? can you take me an example ?
-
12-30-2011, 08:26 AM #2Green Apple
- Join Date
- Dec 2007
- Location
- Mustang Ridge, Texas, United States
- Posts
- 79
- Thanks
- 1
- Thanked 6 Times in 6 Posts
Where are you trying to read it from? a PLIST?? UserDefaults?? Blankspace??
Code:// From user defaults BOOL someBool = [[NSUserDefaults standardUserDefaults] objectForKey:<someKey>]; // From plist NSDictionary *plist = [NSDictionary dictionaryWithContentsOfFile:<filePath>]; BOOL someBool = [plist objectForKey:<someKey>];Last edited by truehybridx; 12-30-2011 at 08:29 AM.
Get the latest info for NoAccSplash Here
Currently it should work on iOS 5.1
If you'd like to help extend its functionality, the source is also available.
-
01-03-2012, 03:54 AM #3
oh sorry :P i want to read from a plist

i have try it
check is a string, and then i send it to a labelCode:check = [filePath objectForKey:@"Test"];
but my app in iOS Crash at launch with this code(only if i take a bool value from plist)Code:Test.text = check;
how can i fix that?



LinkBack URL
About LinkBacks
Reply With Quote
