New ASDelegateProxy class to unify logic for Table & Collection forwarding. Fix dealloc-during-animation crash.

This commit is contained in:
Scott Goodson
2015-12-23 20:01:52 -08:00
parent 928c440b4c
commit ca57059322
14 changed files with 382 additions and 233 deletions

View File

@@ -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];
}