我使用以下代码作为 infolight 按钮(感谢 https://stackoverflow.com/users/630145/ankit-bhardwaj)
// This will create ur info button in center.
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
UIBarButtonItem *infoButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
[infoButton addTarget:self action:@selector(goToRechercherView) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *flexibleLeft = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
toolBar.items = [NSArray arrayWithObjects:flexibleLeft,infoButtonItem,flexibleLeft, nil];
这是动画,我得到了它如何翻转但翻转到同一页面的部分。
//This is for swipe animation. add your view inside.
-(void)goToRechercherView{
[UIView beginAnimations:@"flipview" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view cache:YES];
[UIView commitAnimations];
所以我已经将flipviewcontroller.h .m .xib 文件添加到项目中,我想在flipanimation 中打开那个xib/页面。
有人建议我的方法。