开发者

Flip View error - accessing unknown getter method

I am having a view called NView on which I am having a design button clicking on which I want another view DView in flipview, but it's not working. Below is my code. I got an error called accessing unknown getter method:

NSLog(@"yuppii");
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:([NView superview] ? UIViewAnimationTransition开发者_开发技巧FlipFromLeft : UIViewAnimationTransitionFlipFromRight)
                       forView: DView cache:YES];


It's probably because you aren't using a container view as the transition view. Refer to the documentation on setAnimationTransition:forView:cache:

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.

Try using self.view.superview in the animation transition view of the showMoreInfo:

The reason the showLessInfo: method works is you are using a container view.

or use this way-may be helped u......

CustomViewController *vc = [[CustomViewController alloc] initWithNibName:@"CustomViewController" bundle:nil];

vc.delegate = self;

// The magic statement. This will flip from right to left. // present the modal view controller then when you dismissModalViewController // it will transition flip from left to right. Simple and elegant.

vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController:vc animated:YES];

[vc release];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜