@@ -51,10 +51,9 @@ - (void)viewDidAppear:(BOOL)animated {
5151}
5252
5353@end
54- @interface QCloudLogTableViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
54+ @interface QCloudLogTableViewController () <UITableViewDelegate, UITableViewDataSource>
5555@property (nonatomic , strong ) UITableView *tableView;
5656@property (nonatomic , strong ) NSArray *logsDirecotryArray;
57- - (instancetype )initWithLog : (NSArray *)logContent ;
5857@end
5958
6059@implementation QCloudLogTableViewController
@@ -146,7 +145,7 @@ - (void)onHandleDidFinishLaunching:(NSNotification *)notification {
146145 if ([currentPasteBoardContent isEqualToString: @" ##qcloud-cos-log-ispct##" ]) {
147146 [UIPasteboard generalPasteboard ].string = @" " ;
148147 dispatch_async (dispatch_get_main_queue (), ^{
149- [self showLogs ];
148+ [self handleShowLogs ];
150149 });
151150 }
152151 });
@@ -163,22 +162,22 @@ - (NSString *)readLog:(NSString *)path {
163162 return [[NSString alloc ] initWithData: content encoding: NSUTF8StringEncoding];
164163}
165164
166- - (void )showLogs {
165+ - (void )handleShowLogs {
167166 UIAlertController *alertController = [UIAlertController alertControllerWithTitle: @" 提示"
168167 message: @" 确定显示log"
169168 preferredStyle: UIAlertControllerStyleAlert];
170169 UIAlertAction *actionEnsure = [UIAlertAction actionWithTitle: @" 确定"
171170 style: UIAlertActionStyleDestructive
172171 handler: ^(UIAlertAction *action) {
173- [self onHandleBeginShowlogs ];
172+ [self showLogs ];
174173 }];
175174 UIAlertAction *actionCancel = [UIAlertAction actionWithTitle: @" 取消" style: UIAlertActionStyleDefault handler: nil ];
176175 [alertController addAction: actionEnsure];
177176 [alertController addAction: actionCancel];
178177 UIViewController *currentViewController = [self currentViewController ];
179178 [currentViewController presentViewController: alertController animated: YES completion: nil ];
180179}
181- - (void )onHandleBeginShowlogs {
180+ - (void )showLogs {
182181 NSArray *currentLogPath = [self currentLogs ];
183182 UIViewController *currentViewController = [self currentViewController ];
184183 QCloudLogTableViewController *tableViewController = [[QCloudLogTableViewController alloc ] initWithLog: currentLogPath];
0 commit comments