『壹』 如何讀取Info.plist里自己添加的信息
NSString* File = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"];
NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithContentsOfFile:File];
[dict objectForKey:@"en"]
這里大小寫敏感, 是Info.plist
注意大小寫@@
『貳』 如何讀取Info.plist里自己添加的信息
例如:
在Info.plist添加了自己的信息,如:Bundle language,欄位是en。
示例語句:如何讀取到en的信息
NSString* File = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"];
NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithContentsOfFile:File];
[dict objectForKey:@"en"]
注意點:@部分注意大小寫
『叄』 info是什麼意思
「info」的意思是:信息;情報
讀音:英[ˈɪnfəʊ]、美[ˈɪnfoʊ]
詞性:通常在句中用作名詞。
固定搭配:user info用戶信息
例句:Haveyouhad anymoreinfoaboutthe jobyet?
關於這份工作你有進一步的消息嗎?
(3)info自己添加的信息怎麼讀擴展閱讀:
「info」的近義詞介紹:gen
讀音:英[dʒen]、美[dʒen]
表達意思:情報;一般布告
詞性:通常在句中用作名詞。
固定搭配:Gen-X Cops特警新人類
例句:Auto-genofhumantaskportlet.
人工任務portlet的自動生成。
『肆』 如何讀取Info.plist里自己添加的信息
NSString*File=[[NSBundlemainBundle]pathForResource:@"info"ofType:@"plist"];NSMutableDictionary*dict=[[NSMutableDictionaryalloc]initWithContentsOfFile:File];[dictobjectForKey:@"en"]這里大小寫敏感,是Info.plist注意大小寫@@
『伍』 如何讀取Info.plist里自己添加的信息
以下示例代碼讀取了info.plist 中的 URL Schemes:
// The Info.plist isconsidered the mainBundle.
mainBundle = [NSBundle mainBundle];
NSArray* types=[mainBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"];
NSDictionary* dictionary=[types objectAtIndex:0];
NSArray* schemes=[dictionary objectForKey:@"CFBundleURLSchemes"];
NSLog(@"%@",[schemes objectAtIndex:0]);
『陸』 如何讀取Info.plist里自己添加的信息
NSString* File = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"];
NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithContentsOfFile:File];
[dict objectForKey:@"en"]
這里大小寫敏感, 是Info.plist
注意大小寫@@