| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // NewInterfaceReplacement.m
- // MingMen
- //
- // Created by 罗云飞 on 2017/5/19.
- // Copyright © 2017年 罗云飞. All rights reserved.
- //
- #import "NewInterfaceReplacement.h"
- @implementation NewInterfaceReplacement
- static NewInterfaceReplacement *sharedObj = nil;
- + (instancetype)sharedInstance
- {
- static dispatch_once_t onceToken = 0;
- dispatch_once(&onceToken, ^{
- sharedObj = [[super allocWithZone: NULL] init];
- });
- return sharedObj;
- }
- + (id) allocWithZone:(struct _NSZone *)zone
- {
- return [self sharedInstance];
- }
- - (id) copyWithZone:(NSZone *) zone
- {
- return self;
- }
- - (void)replacementLogin
- {
- //退出云信账号、解绑阿里云推送账号、删除用户单例类以及本地缓存保存的数据
- [UserHelper ExitLogin];
-
- //销毁之前的单利对象
- [NewBasicTabbarController objectDealloc];
-
- //跳转登录界面
- NewLoginViewController *startVc = [[NewLoginViewController alloc] init];
- UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:startVc];
- [AppDelegate shareDelegate].window.rootViewController = navi;
- }
- - (void)replacementController
- {
- //进入程序主控制界面
- [[AppDelegate shareDelegate].window setRootViewController:[NewBasicTabbarController sharedInstance]];
- }
- @end
|