在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
withXCode6
- Remove
Main.storyboard
andLaunchScreen.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:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }
For Swift:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { self.window = UIWindow(frame: UIScreen.mainScreen().bounds) self.window?.backgroundColor = UIColor.whiteColor() self.window?.makeKeyAndVisible() return true }
- 对于ios 7 以后,还有一点要注意:必须在上述方法中再添加如下一行:
self.window.rootViewController= [[UIViewController alloc]init];
Hi Heyuan,
Nice to meet you.
I am the recruiter of Pivotal Beijing.
Currently we are seeking a talent software engineer now.
Do you have any interesting to know more about this opportunity?
Thanks
Susan
Pls. feel free to contact with me by my email : cliang@pivotal.io
Or my fixed line is 010-59822388.