Add "Push Another Copy" to ASViewController demo for memory testing.

So far unable to reproduce the reports of rows or items not being released.
This commit is contained in:
Scott Goodson
2015-10-31 16:40:26 -07:00
parent e11007f906
commit 2e331656cf

View File

@@ -15,12 +15,32 @@
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ViewController alloc] init];
self.window.rootViewController = [[UINavigationController alloc] init];
[self pushNewViewControllerAnimated:NO];
[self.window makeKeyAndVisible];
return YES;
}
- (void)pushNewViewControllerAnimated:(BOOL)animated
{
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
UIViewController *viewController = [[ViewController alloc] init];
viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)];
[navController pushViewController:viewController animated:animated];
}
- (void)pushNewViewController
{
[self pushNewViewControllerAnimated:YES];
}
@end