Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to do the flip animation between two UIViewControllers while clicking info button?
    primarykey
    data
    text
    <p>I have a login page named "LoginViewController". I have an info button in this page. If I click on it, I want to show some information about my application. Also I want to present that information page using flip animation. </p> <p>The code for creating info button is,</p> <pre><code>infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight]; infoButton.frame = CGRectMake(285, 425, 30, 30); infoButton.backgroundColor = [UIColor clearColor]; [infoButton addTarget:self action:@selector(displayInfoView) forControlEvents:UIControlEventTouchUpInside]; </code></pre> <p>If I click on the info button, the <code>displayInfoView</code> method will be called. There I can show a <code>UIView</code> to display some information. Am I right?</p> <p>For flip animation, I used this code...</p> <pre><code>[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:.8]; [UIView setAnimationTransition:([loginPageView superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) forView:mainView cache:YES]; if ([infoView superview]) { [infoView removeFromSuperview]; [mainView addSubview:loginPageView]; } else { [loginPageView removeFromSuperview]; [mainView addSubview:infoView]; } [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)]; [UIView commitAnimations]; </code></pre> <p>Here <code>loginPageView</code> is the login view that contains the info button. <code>infoView</code> is the view that contains the information about application. <code>mainView</code> is the common view that holds the present view.</p> <p>Now my problem is, instead of showing a <code>UIView</code>, can I show an another view controller class while clicking the info button? Remember the flip action works fine with <code>UIView</code>. But when I try with a <code>UIViewController</code>, this makes trouble.</p> <p>Can someone suggest me how to show an UIViewController ( in my app, I need to show <code>AboutViewController</code>) while clicking the info button with the flip effect?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload