English 中文(简体)
逐步过渡在地貌方向上不正确
原标题:Animated transition doesn t work correctly in landscape orientation

我只支持地貌正确方向。

我试图向观点控制者转变,但在进行过渡性估算(如 cur升)时,这种观点轮值为90度(因此模拟器仍然以地貌为导向,但这种观点轮值为90度)。 当过渡结束时,它轮到正确的方向。 我的法典如下。

- (IBAction)buttonTouched
{
    MyViewController *aViewController = [[MyViewController alloc] initWithNibName:NSStringFromClass([MyViewController class]) bundle:nil];

    [UIView transitionFromView:self.view 
                        toView:aViewController.view 
                      duration:2 
                       options:UIViewAnimationOptionTransitionCurlUp 
                    completion:NULL];
}

看来,“定向”通知的“方向改变”,因此在海峡中提出,然后在估算结束后改变景观。 我已在IB中设立了这一机制,以便全面阐述。

EDIT:我还试图增加主计长的观点,以便自己掌握IB档案,并过渡到这种观点(认为在初始阶段和过渡阶段之间可能太接近),但情况相同。

最佳回答

当然,主要原因是,正在用一种新观点取代自我审查(目前是你在地貌上的“知识”)。 因此,人们只想说一句话。 作为自评语(假设书记员不透明)。 顺便说一句,但我错失了过渡期的冰.。 Well:

[UIView transitionWithView:self.view
                  duration:2 
                   options:UIViewAnimationOptionTransitionCurlUp
                animations:^{
                    [self.view addSubview:aViewController.view];
                } 
                completion:NULL];

如果出于某种原因不为你工作,则替代“打字员”。 认为这确实是一个景象:

#define DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) / 180.0 * M_PI)
-(void)setNewViewToLandscape:(UIView*)viewObject {
     //assumes self.view is landscape and viewObject is portrait
     [viewObject setCenter:CGPointMake( self.view.frame.size.width/2,self.view.frame.size.height/2)];
     CGAffineTransform cgCTM = CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(90));
     viewObject.transform = cgCTM;
     viewObject.bounds = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
}

 MyViewController *aViewController = [[MyViewController alloc] initWithNibName:NSStringFromClass([MyViewController class]) bundle:nil];
[self setNewViewToLandscape:aViewController.view];

[UIView transitionFromView:self.view 
                    toView:aViewController.view 
                  duration:2 
                   options:UIViewAnimationOptionTransitionCurlUp 
                completion:NULL];

另有一点是,你的一位书记长正在泄露,因此,你应当将其保留为亲眼主计长的财产。

问题回答

暂无回答




相关问题
images sliding continuously with <table> and jQuery

I m trying to write a little test page that circulates images through a window (see image). I have colored boxes inside a table (gray border), with each box being a element. <table id="boxes" ...

WPF 3d rotation animations

I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, ...

Disable Windows 7 touch animation in WPF

In Windows 7 when you touch the screen there is a short animation that occurs at the touch point. In my WPF app I want to display my own touch points, without showing the one supplied by Windows. ...

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Direct 2D gnuplot PNG animation?

Can anyone please confirm that yes/no Gnuplot 4.5 (on CVS) can output 2D animated PNG files? I have numerous datasets but one line that I d like to show iteratively in 3 different places in my graph. ...

Visual State Manager VS Animations in WPF

There is a lot of talk about the simplicity of Visual States and the transitions between them in WPF/Silverlight. I have the need to generate animations dynamically at runtime, to animate the ...

Create a ImageIcon that is the mirror of another one

I ll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with ...

how to drag in the animation in iphone application?

Iphone application is using the static co-ordinates to reach at some points in the application,which is based on the button event. But what i want is when i drag the item than it should reach at some ...

热门标签