ios - Integer read from plist always returns 0 -


i'm trying value of integer number plist.

nsstring *path = [[nsbundle mainbundle] pathforresource:@"prop" oftype:@"plist"]; nsdictionary *dict = [[nsdictionary alloc] initwithcontentsoffile:path]; int number = [[[dict objectforkey:@"root"] objectforkey:@"quant"] intvalue]; nslog(@"quant %d",number); 

the plist:

<dict>     <key>quant</key>     <integer>5</integer> </dict> 

app runs value of number 0.
have been reading various manuals whole day, can't find error.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -