Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任何人都可以建议我如何从应用程序的 plist 文件中读取 plist 文件。
谢谢
可以通过arrayWithContentsOfFile:方法获取。你需要一个filePath你的.plist文件。见下面的例子: -
arrayWithContentsOfFile:
filePath
.plist
NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"PlistFileName" ofType:@"plist"]; NSArray *array = [NSArray arrayWithContentsOfFile:plistPath];