获取程序中无需释放的ViewController

AppDelegate.happ

@property (strong, nonatomic) UIViewController *viewController;atom

 

在须要用的地方spa

#define appDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)it

 if (!appDelegate.viewController) {io

        appDelegate.viewController =[ [UIViewController alloc]init]class

    }im

    [self presentViewController:appDelegate.viewController animated:YES completion:^{animate

    }];view

相关文章
相关标签/搜索