2011-07-19 11 views

答えて

2

-applicationDidFinishLaunchingで2番目のウィンドウを作成できます。

UIWindow *secondWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 
secondWindow.windowLevel = (UIWindowLevelAlert + 1000.0); 
secondWindow.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.5]; 
secondWindow.userInteractionEnabled = NO; 
[secondWindow makeKeyAndVisible]; 

これは問題なく機能します。しかし、私はIBで働かない。 DunnoがInterface Builderとうまく動作するかどうか。

+0

ありがとうございます。それはまさに私が今やっていることです。 – Andrew

1

新しいビューを割り当て、そのプロパティを設定します(alphabackgroundColorなど)。frame(ウィンドウと同じに設定します)。
ビューを取得したら、それをウィンドウのサブビューとして追加すると、画面全体が表示されます。
userInteractionEnabledNOに設定することもできます。

関連する問題