“UIViewController 子类”未出现在 xcode 4.3 的文件模板库中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9348066/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"UIViewController subclass" does not appear in file template library for xcode 4.3
提问by Shin
I am fairly new to XCODE development currently following several tutorials.
我对 XCODE 开发相当陌生,目前正在学习几个教程。
Bumped into an unexpected problem - looking for help!
遇到一个意想不到的问题 - 寻求帮助!
The problem is that the "UIViewController subclass" does not appear in the file template library. My book and every page I checked has this template under iOS or Mac "Cocoa touch" category. My xcode only shows "Objective-C Class" "Objective-C Category" "Objective-C Class Extension" "Objective-C protocol" "Objective-C Test Case Class"
问题是“UIViewController 子类”没有出现在文件模板库中。我的书和我检查过的每一页在 iOS 或 Mac 的“Cocoa touch”类别下都有这个模板。我的 xcode 只显示“Objective-C 类”“Objective-C 类别”“Objective-C 类扩展”“Objective-C 协议”“Objective-C 测试用例类”
How can I add a new file template of UIViewController subclass ?
如何添加 UIViewController 子类的新文件模板?
My environments: - Snow Leopard - xcode version: 4.3
我的环境: - 雪豹 - xcode 版本:4.3
Thanks in advance!
提前致谢!
回答by Matthias Bauch
Choose objective-c class
and then select UIViewController
as subclass.
选择objective-c class
然后选择UIViewController
为子类。
Apple moved all objective-c class templates into the "Objective-C class" template. They have custom functionality, like "With xib for user interface", there too.
Apple 将所有 Objective-C 类模板移动到“Objective-C 类”模板中。他们也有自定义功能,比如“使用 xib 用于用户界面”。