Skip to content

Commit df07288

Browse files
committed
“本地文件”中没有文件时,不用显示“编辑”按钮。
1 parent 12ed175 commit df07288

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Coding_iOS/Controllers/LocalFoldersViewController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ - (BOOL)findLocalFile{
115115
}
116116
}
117117
[self.myTableView reloadData];
118+
[self changeEditStateToEditing:self.myTableView.isEditing];
118119
return localFileUrlList.count > 0;
119120
}
120121

@@ -208,7 +209,7 @@ - (void)changeEditStateToEditing:(BOOL)isEditing{
208209
UIBarButtonItem *item1 = [UIBarButtonItem itemWithBtnTitle:@"编辑" target:self action:@selector(changeEditState)];
209210
rightBarButtonItems = @[item1];
210211
}
211-
[self.navigationItem setRightBarButtonItems:rightBarButtonItems animated:YES];
212+
[self.navigationItem setRightBarButtonItems:_projectId_list.count > 0? rightBarButtonItems: nil animated:YES];
212213
[self configToolBar];
213214
[self.myTableView performSelector:@selector(reloadData) withObject:nil afterDelay:0.3];
214215
}

0 commit comments

Comments
 (0)