简体   繁体   English

如何将 plist 中的字符串加载到 uitableview

[英]how to load strings in plist into uitableview

Hey I have made up a plist file that has an array of strings init, I'm now trying to figure out a way to load it into my uitableview but am struggling to find a decent example of this.嘿,我已经制作了一个 plist 文件,其中包含一个字符串数组 init,我现在正试图找出一种将其加载到我的 uitableview 中的方法,但我正在努力寻找一个像样的例子。

any help would be appreciated.任何帮助,将不胜感激。

Read the plist data into a data structure (probably an array using + (id)arrayWithContentsOfFile:(NSString *)aPath ).将 plist 数据读入数据结构(可能是使用 + (id)arrayWithContentsOfFile:(NSString *)aPath 的数组)。 Setup the UITableView's delegate to a class that has access to that array, tell the table view to reloadView.将 UITableView 的委托设置为可以访问该数组的 class,告诉表视图重新加载视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM