私はストーリー ボードを使用したくありません。必要に応じて UI に NIB を使用したいと考えています。特に、デフォルトのテンプレートには使用したくありません。
Xcode 5 には、ストーリーボードを使用しないことを示すチェック ボックスがなくなりました。
誰でも助けることができますか?本当に迷惑です...
ストーリーボードを削除する手順 - XCode 5 (編集)
1/ 空のプロジェクトを作成する
2/コントローラー用のxibを使用して新しいファイルを追加します。ビルドフェーズでコンパイル済みソースに追加されていない場合は、そこに手動で追加します。
4) appdelegate didFinishLaunchingWithOptions ファイルを変更し、以下を追加します。
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;
[self.window makeKeyAndVisible];
と同じように :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;
// Override point for customization after application launch.
TestViewController *test = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:test];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
return YES;
}
ストーリーボードの削除手順
1) プロジェクトから Main.storyboard ファイルを削除します。
2)コントローラー用の xib を使用して新しいファイルを追加します。ビルド段階でコンパイル済みソースに追加されていない場合は、そこに手動で追加します。
3) メイン ストーリーボード ファイルのベース名を plist から削除します。
4) appdelegate didFinishLaunchingWithOptions ファイルを変更し、以下を追加します。
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;
[self.window makeKeyAndVisible];
と同じように :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ;
// Override point for customization after application launch.
TestViewController *test = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:test];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
return YES;
}
こちらをご覧ください
このスクリプトを使用して、Xcode 4 テンプレートの輝かしく幸せな輝かしい長所をすべて取り戻します: https://github.com/jfahrenkrug/Xcode4templates
このスクリプトを使用するには、Xcode 4 .app バンドルのコピーが必要です。