简体   繁体   English

存储一个大型文本资源iOS的最佳方法

[英]Best way to store one large text resources iOS

I am super new to iOS(like I just finished hello world) and I have a large text(1.5k words) file that I would like to show in a modal dialog in my application. 我是iOS的超级新手(就像我刚刚完成了hello world一样),并且我有一个很大的文本(1.5k字)文件,希望在应用程序的模式对话框中显示。

However, I am confused on the best way to store this static text file and load it at runtime. 但是,我对存储此静态文本文件并在运行时加载它的最佳方法感到困惑。 Any help and links would be appreciated. 任何帮助和链接将不胜感激。

I see people use .plist, but apparently that is loaded into memory? 我看到人们使用.plist,但显然是加载到内存中了吗?

To use static texts the best way is to do it taking localization into account from the beginning. 要使用静态文本,最好的方法是从一开始就考虑本地化。 Here is a link from Apple Developer showing you how to do it, including how to store strings in a file and loading them into your application. 这是Apple Developer的链接,向您显示了如何进行操作,包括如何将字符串存储在文件中以及如何将字符串加载到应用程序中。

http://developer.apple.com/library/ios/#documentation/MacOSX/Conceptual/BPInternational/Articles/InternatAndLocaliz.html#//apple_ref/doc/uid/20000277-SW1 http://developer.apple.com/library/ios/#documentation/MacOSX/Conceptual/BPInternational/Articles/InternatAndLocaliz.html#//apple_ref/doc/uid/20000277-SW1

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

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