mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-04 19:38:32 +08:00
New ASDelegateProxy class to unify logic for Table & Collection forwarding. Fix dealloc-during-animation crash.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import "PresentingViewController.h"
|
||||
#import "ViewController.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
@@ -31,10 +32,14 @@
|
||||
- (void)pushNewViewControllerAnimated:(BOOL)animated
|
||||
{
|
||||
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
|
||||
|
||||
|
||||
#if SIMULATE_WEB_RESPONSE
|
||||
UIViewController *viewController = [[PresentingViewController alloc] init];
|
||||
#else
|
||||
UIViewController *viewController = [[ViewController alloc] init];
|
||||
viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)];
|
||||
|
||||
#endif
|
||||
|
||||
[navController pushViewController:viewController animated:animated];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user