iOS: Access app-info.plist variables in code

前端 未结 5 1525
-上瘾入骨i
-上瘾入骨i 2020-11-28 23:21

I am working on a Universal app & would like to access the values stored in app-info.plist file in my code.

Reason: I instantiate a UIViewController dynamically

5条回答
  •  忘掉有多难
    2020-11-29 00:14

    NSString *path = [[NSBundle mainBundle] pathForResource: @"YOURPLISTNAME" ofType: @"plist"]; 
    NSMutableDictionary *dictplist =[[NSMutableDictionary alloc] initWithContentsOfFile:path];
    

提交回复
热议问题