Search Results for '뷰전환'

ATOM Icon

1 POSTS

  1. 2012/01/22 [iPhone] 멀티뷰 뷰 전환 by incree

[iPhone] 멀티뷰 뷰 전환

시작하세요. 아이폰 프로그래밍 6장 예제

- (IBAction)switchViews:(id)sender

{

    [UIView beginAnimations:@"View Flip" context:nil];

    [UIView setAnimationDuration:1.25];

    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

    

    if (self.yellowViewController.view.superview == nil)

    {

        if (self.yellowViewController == nil)

        {

            YellowViewController *yellowController =

            [[YellowViewController alloc] initWithNibName:@"YellowView" 

                                                   bundle:nil];

            self.yellowViewController = yellowController;

            [yellowController release];

        }

        [UIView setAnimationTransition:

         UIViewAnimationTransitionFlipFromRight

                               forView:self.view cache:YES];

        

        [blueViewController viewWillAppear:YES];

        [yellowViewController viewWillDisappear:YES];

        [blueViewController.view removeFromSuperview];

        [self.view insertSubview:yellowViewController.view atIndex:0];

        [yellowViewController viewDidDisappear:YES];

        [blueViewController viewDidAppear:YES];

    }

    else

    {

        if (self.blueViewController == nil)

        {

            BlueViewController *blueController =

            [[BlueViewController alloc] initWithNibName:@"BlueView" 

                                                 bundle:nil];

            self.blueViewController = blueController;

            [blueController release];

        }

        [UIView setAnimationTransition:

         UIViewAnimationTransitionFlipFromLeft

                               forView:self.view cache:YES];

        

        [yellowViewController viewWillAppear:YES];

        [blueViewController viewWillDisappear:YES];

        [yellowViewController.view removeFromSuperview];

        [self.view insertSubview:blueViewController.view atIndex:0];

        [blueViewController viewDidDisappear:YES];

        [yellowViewController viewDidAppear:YES];

    }

    [UIView commitAnimations];

}

Posted by incree

2012/01/22 19:36 2012/01/22 19:36
,
Response
0 Trackbacks , 0 Comments
RSS :
http://www.incree.com/tc/incree/rss/response/89

Trackback URL : 이 글에는 트랙백을 보낼 수 없습니다


Notices

Archives

Authors

  1. incree

Recent Trackbacks

Calendar

«   2019/11   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Site Stats

Total hits:
594694
Today:
91
Yesterday:
239