Does anyone know if Cocoa has anything similar to .NET app.config file? I was looking at nib files, but I think it's a bit different?! Thank you!
问问题
387 次
2 回答
3
是的,由 xcode 为任何新应用程序创建的 Appname-Info.plist。请参阅https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/PropertyLists/index.html
然后,您可以使用...访问属性
NSBundle* bundle = [NSBundle mainBundle];
NSString* property = [bundle objectForInfoDictionaryKey:@"keyname"];
于 2012-10-04T16:35:12.463 回答
1
考虑使用也可以通过“defaults”命令从命令行读取/写入的 NSUserDefaults。
于 2012-10-04T18:22:36.627 回答