まず、ターゲット設定の"Main Interface"を消す
IBのファイル(拡張子が.xib)を削除
AppDelegate.hの修正
#import@class SampleViewController; @interface SampleAppDelegate : NSObject { UIWindow *window; UIViewController *viewController; } @property (nonatomic, retain) UIWindow *window; @end
AppDelegate.mの修正
#import "SampleAppDelegate.h"
#import "SampleViewController.h"
@implementation SampleAppDelegate
@synthesize window;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
viewController = [[SampleViewController alloc] init];
window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
[window addSubview:viewController.view];
[window makeKeyAndVisible];
return YES;
}
- (void)dealloc
{
[window release];
[viewController release];
[super dealloc];
}
@endmain.mの修正
int retVal = UIApplicationMain(argc, argv, nil, @"SampleAppDelegate");
で、よし。
IBは楽だし便利だけど、私としてはがしがしコードを書きたいな。
そう思うのはIB全く使ってないからかもしれないけど、、ね。
Thanks on your marvelous posting! I certainly enjoyed reading it, you will be a
返信削除great author. I will be sure to bookmark your blog and will eventually
come back very soon. I want to encourage you to continue
your great work, have a nice holiday weekend!
Feel free to visit my site; hack clash of clans