1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- //
- // CGXVerticalMenuCustomBaseView.m
- // CGXVerticalMenuView-OC
- //
- // Created by CGX on 2018/05/01.
- // Copyright © 2019 CGX. All rights reserved.
- //
- #import "CGXVerticalMenuCustomBaseView.h"
- @implementation CGXVerticalMenuCustomBaseView
- - (void)willMoveToSuperview:(UIView *)newSuperview {
- [super willMoveToSuperview:newSuperview];
- UIResponder *next = newSuperview;
- while (next != nil) {
- if ([next isKindOfClass:[UIViewController class]]) {
- UIViewController *vc = (UIViewController *)next;
- if (@available(iOS 11.0, *)) {
- vc.automaticallyAdjustsScrollViewInsets = NO;
- }
- break;
- }
- next = next.nextResponder;
- }
- }
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- [self initializeData];
- [self initializeViews];
- }
- return self;
- }
- - (instancetype)initWithCoder:(NSCoder *)coder
- {
- self = [super initWithCoder:coder];
- if (self) {
- [self initializeData];
- [self initializeViews];
- }
- return self;
- }
- - (void)initializeData
- {
-
- }
- - (void)initializeViews
- {
-
- }
- /*
- // Only override drawRect: if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- - (void)drawRect:(CGRect)rect {
- // Drawing code
- }
- */
- @end
|