等效于R中的iOS [英] Equivalent to R in iOS

查看:120
本文介绍了等效于R中的iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在android的,我们有R类是代表资源,在这里我们引用我们所有的资源,我们可以轻松地访问他们在code。有没有在iOS中的相同呢?我有这样的疑问,因为,我希望能够定义多​​个文件使用不同的值,例如:

In android we have the R class that stands for Resources, where we have references to all of our resources and we can easily access them in the code. Is there an equivalent in iOS? I have this doubt because, I want to be able to define multiple files with different values, for instance:

  • DefaultValues​​ForViewController1
  • DefaultValues​​ForViewController2

除了创造plist中,有另一种方式(更快,更容易喜欢R)?

Besides creating plist, is there another way (faster and easier like R)?

推荐答案

无R类等效访问方法。

在Android中,R类重presents获得资源被合并成一个原生格式。 iPhone不这样做。相反,资源文件只是原样复制到应用程序包,必须找到和放大器;开这样。

In Android, the R class represents access to resources that are consolidated into a native format. iPhone does not do this. Instead, resource files are just copied as is into the application bundle and must be found & opened as such.

这篇关于等效于R中的iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆