feat:DevKit add disconnect action

This commit is contained in:
pengfei.zhou
2020-03-20 15:53:09 +08:00
committed by osborn
parent 4d6884098c
commit e9d8018a09
7 changed files with 37 additions and 5 deletions

View File

@@ -44,6 +44,8 @@ - (void)viewDidLoad {
it.dataSource = self;
it.delegate = self;
}]];
UIBarButtonItem *rightBarItem = [[UIBarButtonItem alloc] initWithTitle:@"Disconnect" style:UIBarButtonItemStylePlain target:self action:@selector(onClose)];
self.navigationItem.rightBarButtonItem = rightBarItem;
if ([[DoricDev instance] isInDevMode]) {
return;
}
@@ -56,7 +58,10 @@ - (void)viewDidLoad {
[self.navigationController pushViewController:[QRScanViewController new] animated:NO];
}
}
- (void)onClose {
[[DoricDev instance] closeDevMode];
[self.navigationController popViewControllerAnimated:YES];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [DoricContextManager.instance aliveContexts].count;
}