mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-04 20:57:49 +00:00
36 lines
972 B
Objective-C
36 lines
972 B
Objective-C
//
|
|
// CrossFadeSegue.m
|
|
// RobloxMobile
|
|
//
|
|
// Created by Kyler Mulherin on 10/29/15.
|
|
// Copyright © 2015 ROBLOX. All rights reserved.
|
|
//
|
|
|
|
#import "CrossFadeSegue.h"
|
|
|
|
@implementation CrossFadeSegue
|
|
|
|
-(void) perform
|
|
{
|
|
//grab our views
|
|
UIViewController* source = self.sourceViewController;
|
|
UIViewController* destination = self.destinationViewController;
|
|
|
|
//initialize a view to fade in
|
|
destination.view.hidden = NO;
|
|
destination.view.alpha = 0.0;
|
|
|
|
//animate the transition
|
|
[UIView animateWithDuration:0.5
|
|
delay:0.0
|
|
options:UIViewAnimationOptionCurveEaseIn
|
|
animations:^{
|
|
//fade in the next screen
|
|
destination.view.alpha = 1.0;
|
|
} completion:^(BOOL finished) {
|
|
[source.navigationController pushViewController:destination animated:NO];
|
|
}];
|
|
}
|
|
|
|
@end
|