回転画像風景2XIB
-
21-09-2019 - |
質問
との付き合いのなかで2Gui2つのコントローラ 1と呼ばれlandscapeguicontrollerになるというhighguicontroller.
現在一般的に呼びかけにhighguicontrollerやって回転させiphoneを検出することで、landscapeguicontroller:コード:
landscapeguicontroller *neu =[[landscapeguicontroller alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:neu animated:YES];
[self dismissModalViewControllerAnimated:YES];
問題はその後アニメーションにより押しの新しいウィンドウから外側にはiphoneのウインドウです。
のLandscapeguicontrollerって追加され、次のような
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
いきたい時に戻りhighguicontroller呼ん:
[self dismissModalViewControllerAnimated:YES];
すべての作品だが、第二のアニメを見て、正しい"回転アニメーション".またご意見募集
で短問題の記述:の1.アニメーションの高い風景、風景を押すと、画面 もの2.アニメーションの風景高は、回転のような実際の自転...
たいの1.アニメのように見える2.アニメ
ベストについて Ploetzeneder
解決
回避"の問題は、その後アニメーションにより押しの新しいウィンドウから外側にはiphoneのウインドウです。", う設定のコントローラのmodalTransitionStyle物件で、かつ以下のいずれかの、何を希望す:typedef enum{ UIModalTransitionStyleCoverVertical=0, UIModalTransitionStyleFlipHorizontal, UIModalTransitionStyleCrossDissolve, }UIModalTransitionStyle;
また、いようにしたい場合はアニメーションの回転を任意で設定することができshouldRotate...方法を許可その他、オリエンテーション、その後は設定通知を受け取るための装置の物理的変化の方向をご提示いただくとモーダルviewcontrollerが、適切な方向です。見Apple社の"AlternateViews"サンプルコードの一例です。
の通知を反映して身体の向き装置、受信できるかどうか、インターフェースが変更させて頂きます。(できのUIApplicationsのstatusBarOrientation財産に向のUIです。
他のヒント
そのようにしたいのシーケンスに行くようになります:
- 物理的に回転させ、デバイスを縦画面風景
- アニメーションの縦画面(
highguicontroller
)の景観 - 押しの風景ビュー
landscapeguicontroller
)からの"底"の画面
場合はそうする必要がありましては、次のようなものがお highguicontroller
実施:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
このステップ2であることを伝えてください回転させ縦画面風景は様までご利用になれます。■
了し、管理状態の行き届いていて思ったこと。
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
if(fromInterfaceOrientation == UIInterfaceOrientationPortrait) {
[self presentModalViewController:landscapeguicontroller animated:YES];
}
else {
[self dismissModalViewControllerAnimated:YES];
}
}
るべき風景を眺めた後は、回転アニメーションが完了し、その解任後のデバイスを回転させバportrait.
こ!