This commit is contained in:
2025-11-17 14:53:23 +08:00
parent d9bfc30c88
commit 1d215ffdb3
19 changed files with 208 additions and 39 deletions

View File

@@ -4,6 +4,7 @@
//
#import "MySkinVC.h"
#import "KBSkinDetailVC.h"
#import <Masonry/Masonry.h>
#import "UIColor+Extension.h"
#import <MJRefresh/MJRefresh.h>
@@ -32,8 +33,11 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
// self.title = @"My Skin"; //
// Editor/Cancel
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Editor" style:UIBarButtonItemStylePlain target:self action:@selector(onToggleEdit)];
// Editor/Cancel 使 BaseViewController kb_rightButton
self.kb_rightButton.hidden = NO;
[self.kb_rightButton setTitle:@"Editor" forState:UIControlStateNormal];
[self.kb_rightButton removeTarget:nil action:NULL forControlEvents:UIControlEventAllEvents];
[self.kb_rightButton addTarget:self action:@selector(onToggleEdit) forControlEvents:UIControlEventTouchUpInside];
// +
self.data = [NSMutableArray array];
@@ -104,7 +108,8 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
self.editingMode = !self.editingMode;
//
self.navigationItem.rightBarButtonItem.title = self.isEditingMode ? @"Cancel" : @"Editor";
[self.kb_rightButton setTitle:(self.isEditingMode ? @"Cancel" : @"Editor")
forState:UIControlStateNormal];
//
self.bottomView.hidden = !self.isEditingMode;
@@ -186,6 +191,8 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
if (!self.isEditingMode) {
//
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
KBSkinDetailVC *vc = [[KBSkinDetailVC alloc] init];
[self.navigationController pushViewController:vc animated:true];
return;
}
MySkinCell *cell = (MySkinCell *)[collectionView cellForItemAtIndexPath:indexPath];