0

iOS開発初心者です。次のコードを使用しています。

AskViewController *askController=[[AskViewController alloc]initWithNibName:@"AskViewController" bundle:nil];
askController.view.transform = CGAffineTransformMakeScale(0.01, 0.01); 
[UIView beginAnimations:@"animationExpand" context:NULL];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationCurve:UIViewAnimationOptionOverrideInheritedDuration];
askController.view.transform=CGAffineTransformMakeScale(1, 1);
[UIView setAnimationDelegate:self];
[UIView commitAnimations];
[self.navigationController pushViewController:askController animated:NO];

askViewcontroller をナビゲーションにプッシュすると、黒い画面のアニメーションで AskViewcontroller が表示されます。その黒い画面を白または他の色の画面に変更したい。

どんな助けでも大歓迎です。

4

2 に答える 2

3

アプリ デリゲートのdidFinishLaunchingWithOptionsメソッドに、次の行を追加します。

self.window.backgroundColor = [UIColor greenColor];
于 2013-03-01T06:55:29.743 に答える
0

たとえば、askController.view の backgroundColor を設定してみてください。

[askController.view setBackgroundColor:[UIColor greenColor]];

askController.view の backgroundColor を緑に設定します。

于 2013-03-01T06:27:13.570 に答える