为什么 Xcode 不为文件名添加前缀? [英] Why is Xcode not prefixing filenames?

查看:31
本文介绍了为什么 Xcode 不为文件名添加前缀?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启动一个 iOS 单视图应用程序项目时,AppDelegate 文件和 ViewController 文件没有像以前那样以项目名称作为前缀.

When I start an iOS single view application project, the AppDelegate files and ViewController files are not prefixing with the project name like they used to.

当我打开一个新项目时文件名如下:

files names are as follows when I open a new project:

AppDelegate.h
AppDelegate.m
MainStoryBoard.storyboard
ViewController.h
ViewController.m

这是为什么?

推荐答案

您必须手动添加它.当您创建一个新项目时,只需填写屏幕上的类前缀"字段,您可以在其中命名项目/捆绑包 ID/等.

You have to add it manually. When you create a new project just fill out the "Class Prefix" field on the screen where you name the project/bundle id/ etc..

只需在下面的屏幕截图中我写的THIS IS THE PREFIX"的地方添加您的前缀

Just add your prefix where I wrote "THIS IS THE PREFIX" in the screenshot below

如果您想在创建项目后添加前缀,可以在 Xcode 右侧窗格的文件检查器中执行此操作:

If you want to add a prefix after you've created your project, you can do so in the file inspector on Xcode's right pane:

这篇关于为什么 Xcode 不为文件名添加前缀?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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