开发者

accessing root.strings from settings.bundle?

I am using settings bundle for my app. I could not access root.plist and root.strings file of settings bundle from the following code. Could anyone help?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *plist = [[NSBundle mainBundle] pathForResource:@"Root" ofType:@"plist"];
开发者_运维知识库NSDictionary *rootofplist = [NSDictionary dictionaryWithContentsOfFile:plist];
NSArray *preferenceitems = (NSArray *) [rootofplist valueForKey:@"PreferenceSpecifiers"];
}


iPhone is case sensitive, try @"root" instead of @"Root"...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜