Commit 937cfa54677057873621eefa2a3875670def1718
1 parent
bac9f015
no message
Showing
2 changed files
with
27 additions
and
5 deletions
CNLiveSettingModule.podspec
| @@ -64,6 +64,7 @@ TODO: 网家家-设置模块. | @@ -64,6 +64,7 @@ TODO: 网家家-设置模块. | ||
| 64 | ss.dependency 'CNLiveSettingModule/View' | 64 | ss.dependency 'CNLiveSettingModule/View' |
| 65 | 65 | ||
| 66 | end | 66 | end |
| 67 | + | ||
| 67 | # 关于网家家 | 68 | # 关于网家家 |
| 68 | s.subspec 'AboutUs' do |ss| | 69 | s.subspec 'AboutUs' do |ss| |
| 69 | ss.source_files = 'CNLiveSettingModule/Classes/AboutUs/*.{h,m}' | 70 | ss.source_files = 'CNLiveSettingModule/Classes/AboutUs/*.{h,m}' |
CNLiveSettingModule/Classes/Controller/CNLiveSettingController.m
| @@ -303,11 +303,32 @@ static const NSInteger timeValue = 1.5; | @@ -303,11 +303,32 @@ static const NSInteger timeValue = 1.5; | ||
| 303 | } | 303 | } |
| 304 | } | 304 | } |
| 305 | - (void)logoutDidClicked:(UIButton *)btn{ | 305 | - (void)logoutDidClicked:(UIButton *)btn{ |
| 306 | - [UIApplication sharedApplication].delegate.window.rootViewController = nil; | ||
| 307 | - [self cleanLocalCache]; | ||
| 308 | - id<CNLiveLoginServiceProtocol> login = [[BeeHive shareInstance] createService:@protocol(CNLiveLoginServiceProtocol)]; | ||
| 309 | - UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[login getLoginViewController]]; | ||
| 310 | - [UIApplication sharedApplication].delegate.window.rootViewController = nav; | 306 | + QMUIAlertAction *sure = [QMUIAlertAction actionWithTitle:@"退出登录" style:QMUIAlertActionStyleDefault handler:^(__kindof QMUIAlertController *aAlertController, QMUIAlertAction *action) { |
| 307 | + [UIApplication sharedApplication].delegate.window.rootViewController = nil; | ||
| 308 | + [self cleanLocalCache]; | ||
| 309 | + id<CNLiveLoginServiceProtocol> login = [[BeeHive shareInstance] createService:@protocol(CNLiveLoginServiceProtocol)]; | ||
| 310 | + UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[login getLoginViewController]]; | ||
| 311 | + [UIApplication sharedApplication].delegate.window.rootViewController = nav; | ||
| 312 | + | ||
| 313 | + }]; | ||
| 314 | + QMUIAlertAction *cancel = [QMUIAlertAction actionWithTitle:@"取消" style:QMUIAlertActionStyleCancel handler:^(__kindof QMUIAlertController *aAlertController, QMUIAlertAction *action) { | ||
| 315 | + }]; | ||
| 316 | + | ||
| 317 | + QMUIAlertController *alertController = [QMUIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:QMUIAlertControllerStyleActionSheet]; | ||
| 318 | + [alertController addAction:sure]; | ||
| 319 | + [alertController addAction:cancel]; | ||
| 320 | + | ||
| 321 | + NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; | ||
| 322 | + | ||
| 323 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | ||
| 324 | + | ||
| 325 | + NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; | ||
| 326 | + cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ||
| 327 | + | ||
| 328 | + sure.buttonAttributes = titleAttributs; | ||
| 329 | + cancel.buttonAttributes = cancelAttributs; | ||
| 330 | + | ||
| 331 | + [alertController showWithAnimated:YES]; | ||
| 311 | 332 | ||
| 312 | } | 333 | } |
| 313 | 334 |