1234567891011121314151617181920212223242526272829303132333435 |
- //
- // UIViewController+Expand.m
- // DDTG
- //
- // Created by 翟玉磊 on 16/5/6.
- // Copyright © 2016年 翟玉磊. All rights reserved.
- //
- #import "UIViewController+Expand.h"
- @implementation UIViewController (Expand)
- + (void)load {
-
- SEL originalSelector = @selector(viewDidLoad);
- SEL swizzledSelector = @selector(swizzled_viewDidLoad);
-
- [DDYHookUtility SwizzlingInClass:[self class] originalSelector:originalSelector swizzledSelector:swizzledSelector];
- }
- #pragma mark - Method Swizzling
- //设置背景
- - (void)swizzled_viewDidLoad {
-
- if (![self isKindOfClass:NSClassFromString(@"UIInputWindowController")] && ![NSStringFromClass([self class]) isEqualToString:@"UINavigationController"]) {
-
- // self.view.backgroundColor = APPBackgroundColor;
- }
- [self swizzled_viewDidLoad];
- }
- @end
|