xib的名称约定 [英] Name conventions for xibs

查看:106
本文介绍了xib的名称约定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在看示例代码,有时候苹果命名xib文件 ClassNameView ,有时候 ClassNameViewController ClassName 始终是 UIViewController UITableViewController 我不知道命名一个xib时使用什么约定。我认为View不是真正的 ViewController ,但好奇的是什么约定是或至少你的命名约定为xibs。 / p>

I've been looking at the sample code and sometimes Apple names xib files ClassNameView and sometimes ClassNameViewController. The ClassName is always a UIViewController or UITableViewController, which had me wonder what convention to use when naming a xib. I would think View as it's not really the ViewController, but curious on what the convention is or at least what your naming conventions are for xibs.

推荐答案

我使用ClassNameView,因为xib表示视图,而不是视图控制器。我不认为有一个公认的惯例。

I use ClassNameView since the xib represents the view, not the view controller. I don't think there is a generally accepted convention.

这篇关于xib的名称约定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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