mirror of
https://github.com/wu736139669/jingdongkaipule.git
synced 2026-08-05 05:55:19 +00:00
初始化代码
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// KPWebViewController+hook.m
|
||||
// TestKeplerDemo
|
||||
//
|
||||
// Created by xmfish on 17/1/5.
|
||||
// Copyright © 2017年 jd. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPWebViewController+hook.h"
|
||||
#import <objc/runtime.h>
|
||||
@implementation KPWebViewController (hook)
|
||||
|
||||
+ (void)load
|
||||
{
|
||||
Method ori_Method = class_getInstanceMethod([KPWebViewController class], @selector(viewWillAppear:));
|
||||
Method my_Method = class_getInstanceMethod([KPWebViewController class], @selector(ash_viewWillAppear:));
|
||||
|
||||
method_exchangeImplementations(ori_Method, my_Method);
|
||||
}
|
||||
|
||||
- (void)ash_viewWillAppear:(BOOL)animal
|
||||
{
|
||||
[self ash_viewWillAppear:animal];
|
||||
|
||||
UIView* navigationview = [[self valueForKey:@"_kpView"] valueForKey:@"_navigationView"];
|
||||
navigationview.hidden = YES;
|
||||
UINavigationController* nav = self.navigationController;
|
||||
|
||||
nav.navigationBar.hidden = NO;
|
||||
[nav setNavigationBarHidden:NO];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user