// // 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