0

我正在尝试制作动画以在我拥有的两个 UIViewController 之间切换。但是当动画运行时,旧的 UIViewController 是白色的。

    // viewController is the new UIViewController 
[UIView animateWithDuration:0.6 
        delay:0 
    options:UIViewAnimationOptionCurveLinear 
        animations:^(void){
             [viewController.view setTransform:CGAffineTransformMakeTranslation(0, -460)];
        }
        completion:^(BOOL finished){
             if (finished){
                //
             }
        }
    ];

    [[[[UIApplication sharedApplication] delegate] window] setRootViewController:viewController];
    [[[[UIApplication sharedApplication] delegate] window] makeKeyAndVisible];

我有一个始终具有 UIViewController 的对象:

@interface ManagerViews : NSObject {

    UIViewController *oneController;
    UIViewController *twoController;
    ...
}
@property(nonatomic, retain) UIViewController *oneController;
@property(nonatomic, retain) UIViewController *twoController;
...

我究竟做错了什么?

4

1 回答 1

0

您是否尝试将旧的 UIViewController 设置为“nil”或(我的 Objective-C 专业知识有点生疏)重置?

于 2012-05-28T09:07:41.513 回答