在XCode 6的某个版本后,XCode的项目向导取消了空的ios工程选项。
参考 http://stackoverflow.com/questions/25783282/how-to-create-an-empty-application-in-xcode-6-without-storyboard
可以如下操作:
There is no option in
XCode6
for directly creating an Empty Application as in
XCode5
and earlier. But still we can create application without
Storyboard
in
XCode6
by following these steps:
- Create an
Single View Application
with XCode6
- Remove
Main.storyboard
and LaunchScreen.xib
(select them, right-click, and choose to either remove them from the project, or delete them completely).
- Remove "Main storyboard file base name" and "Launch screen interface file base name" entries in
Info.plist
file.
- Open AppDelegate.m, and edit applicationDidFinishLaunchingWithOptions so that it looks like this:
[crayon-575d2dd4bcc05846452416/]
For Swift:
[crayon-575d2dd4bcc10731767516/]
- 对于ios 7 以后,还有一点要注意:必须在上述方法中再添加如下一行:
[crayon-575d2dd4bcc15426708795/]
更新:
还有一种方法,可以直接恢复 向导中的选项。