mirror of
https://github.com/DKJone/DKWechatHelper.git
synced 2025-05-28 14:56:10 +08:00
33 lines
999 B
Plaintext
33 lines
999 B
Plaintext
#import <UIKit/UIKit.h>
|
|
#import "DKHelper.h"
|
|
#import "DKHelperSettingController.h"
|
|
|
|
|
|
%hook NewSettingViewController
|
|
- (void)reloadTableData{
|
|
%orig;
|
|
WCTableViewManager *tableViewMgr = MSHookIvar<id>(self, "m_tableViewMgr");
|
|
MMTableView *tableView = [tableViewMgr getTableView];
|
|
WCTableViewNormalCellManager *newCell = [%c(WCTableViewNormalCellManager) normalCellForSel:@selector(setting) target:self title:@"微信小助手"];
|
|
[((WCTableViewSectionManager*)tableViewMgr.sections[0]) addCell: newCell];
|
|
[tableView reloadData];
|
|
}
|
|
|
|
%new
|
|
- (void)setting {
|
|
UIViewController *vc = [[DKHelperSettingController alloc] init];
|
|
[((UIViewController *)self).navigationController PushViewController:vc animated:true];
|
|
}
|
|
|
|
%end
|
|
|
|
|
|
%hook UIViewController
|
|
- (void)viewWillAppear:(BOOL)animated{
|
|
%orig;
|
|
NSLog(@"\n***********************************************\n\t%@ appear\n***********************************************\n",NSStringFromClass([(NSObject*)self class]));
|
|
}
|
|
|
|
%end
|
|
|