2010-12-02 5 views
0

私は別のビューを希望するデザインボタンをクリックしているNViewというビューを持っています。フリップビューでDViewが動作しません。以下は私のコードです。私はエラーがaccessing unknown getter method呼ばれました:フリップビューのエラー - 不明なゲッターメソッドへのアクセス

NSLog(@"yuppii"); 
[UIView beginAnimations:nil context:NULL]; 
[UIView setAnimationDuration:0.75]; 
[UIView setAnimationTransition:([NView superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) 
         forView: DView cache:YES]; 
+0

エラーメッセージをお読みください。まだ不明な場合は、ここに示してください。 – Eiko

+0

[NView superview]ここにprobがあります。 NViewとは何ですかNSView – iOSPawan

+0

NViewはUIViewの単なる名前です.... – neha

答えて

0

トランジションビューとしてコンテナビューを使用していないので、それはおそらくです。 setAnimationTransition上のドキュメントを参照してください:forView:キャッシュ:

If you want to change the appearance of a view during a transition—for example, flip from one view to another—then use a container view, an instance of UIView, as follows: 

    1. Begin an animation block. 
    2. Set the transition on the container view. 
    3. Remove the subview from the container view. 
    4. Add the new subview to the container view. 
    5. Commit the animation block. 

showMoreInfoのアニメーション遷移図でself.view.superviewを使用してみてください:

理由showLessInfo:メソッドは動作しますが、使用しているありますコンテナビュー。

またはこの使用方法を-も...... Uを助けたこと

CustomViewController * VC = [[CustomViewControllerのalloc] initWithNibName: "CustomViewController" バンドル@:nilを];

vc.delegate = self;

//魔法の声明。これは右から左に反転します。 //モダールビューコントローラーを表示します。モダールビューコントローラー を解除すると、//左から右にフリップを移動します。シンプルでエレガント。

vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizo​​ntal;

[self presentModalViewController:vc animated:YES];

[vc release];