|
|
@@ -36,14 +36,14 @@ static NSString *kLastMode = @"lastChooseMode";
|
|
|
self.lastChoosedIndex = -1;
|
|
|
|
|
|
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStylePlain target:self action:@selector(logoutItemClick:)];
|
|
|
- AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
|
|
+
|
|
|
self.title = @"Select Mode";
|
|
|
- self.modeList = appDelegate.modeList;
|
|
|
self.modeTable.tableFooterView = [UIView new];
|
|
|
|
|
|
[self removeFirstResponderTap]; // 不然cell接受不了消息
|
|
|
|
|
|
self.companyIcon = [UIImage imageNamed:@"AppIcon40x40"];
|
|
|
+ self.companyNameLabel.text = nil;
|
|
|
}
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated {
|
|
|
@@ -87,6 +87,11 @@ static NSString *kLastMode = @"lastChooseMode";
|
|
|
self.companyIconView.image = companyIcon;
|
|
|
}
|
|
|
|
|
|
+- (NSArray *)modeList {
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
|
|
+ return appDelegate.modeList;
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark - DataSource
|
|
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
@@ -178,6 +183,7 @@ static NSString *kLastMode = @"lastChooseMode";
|
|
|
[alert dismissWithClickedButtonIndex:0 animated:YES];
|
|
|
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
|
|
if (result == RESULT_TRUE) {
|
|
|
+ weakself.companyIcon = [UIImage imageNamed:@"AppIcon40x40"];
|
|
|
[appDelegate logout];
|
|
|
} else {
|
|
|
__strong typeof(weakself) strongself = weakself;
|