3.0beta 2つのTips

| | コメント(0)
2.2.1 では動作するが、3.0beta4では空白の画面になる、ApplicationDelegateのコード。


	// Create the window 
	window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
	// Create the navigation and view controllers 
	MSSelectViewController *rootViewController = [[MSSelectViewController alloc] 						  initWithDatabase:database]; 
	navigationController = [[UINavigationController alloc] 
		initWithRootViewController:rootViewController]; 
	
	[rootViewController release]; 
	// Configure and show the window 
	[window addSubview:[navigationController view]];
	
    // Override point for customization after application launch
    [window makeKeyAndVisible];


3.0beta4で動作するコード。違いはwindowsの初期化をしていないことと、rootviewControllerのリリース位置が違う。

	// Create the window 
	//window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
	// Create the navigation and view controllers 
	MSSelectViewController *rootViewController = [[MSSelectViewController alloc] 				  		initWithDatabase:database]; 
	
	navigationController = [[UINavigationController alloc] 
		initWithRootViewController:rootViewController];	
	
	// Configure and show the window 
	[window addSubview:[navigationController view]];
	
    // Override point for customization after application launch
    [window makeKeyAndVisible];
	[rootViewController release];


もうひとつのTip、MPMediaPlayerはsetQueueWithItemCollectionで再生する時には、シャッフルモードになっているときには動作しない。さもありなんというところか。

カテゴリ

コメントする


画像の中に見える文字を入力してください。

このブログ記事について

このページは、kawaguchiが2009年5月 6日 12:22に書いたブログ記事です。

ひとつ前のブログ記事は「iPhone OS 3.0 beta4のバグを回避する」です。

次のブログ記事は「近況20090509」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

Powered by Movable Type 4.0

Twitter