如何在适用于 iOS 的新版 XCode 版本 6.0.1 (6A317) 中创建 Objective-C 协议
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26320629/
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
How to create Objective-C Protocol in new version of XCode Version 6.0.1 (6A317) for iOS
提问by Renat Gatin
In previous versions when you press New File, in iOS --> Cocoa Touch --> there was Objective-C protocol, but now I can't find it there!?
在以前的版本中,当你按下 New File 时,在 iOS --> Cocoa Touch --> 有 Objective-C 协议,但现在我在那里找不到它!?
回答by Oleg Sobolev
Familiar problem after update.
更新后的熟悉问题。
Step one: press CMD+N and choose Objective-C File in menu
第一步:按CMD+N,在菜单中选择Objective-C File
Step two: press Next and choose file type.
第二步:按下一步并选择文件类型。
回答by KirkSpaziani
Add File -> Source -> Objective-C File -> [Now there's a combo for file type, select Protocol in there]
添加文件 -> 源 -> Objective-C 文件 -> [现在有文件类型的组合,在那里选择协议]