From 92ebe0060037e6958a0f5c7e5e0be60c88d1197b Mon Sep 17 00:00:00 2001 From: vvard3n Date: Thu, 8 Feb 2018 16:27:31 +0800 Subject: [PATCH] iOS 11 Layout Support --- MKDropdownMenu/MKDropdownMenu.h | 2 ++ MKDropdownMenu/MKDropdownMenu.m | 1 + 2 files changed, 3 insertions(+) diff --git a/MKDropdownMenu/MKDropdownMenu.h b/MKDropdownMenu/MKDropdownMenu.h index d4f6e51..63e5d3d 100644 --- a/MKDropdownMenu/MKDropdownMenu.h +++ b/MKDropdownMenu/MKDropdownMenu.h @@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, weak, nonatomic) IBOutlet id dataSource; @property (nullable, weak, nonatomic) IBOutlet id delegate; +@property(nonatomic, assign) CGSize intrinsicContentSize; + /// The view the dropdown to be presented in. If not specified, the dropdown will be presented in the containing window. @property (nullable, weak, nonatomic) IBOutlet UIView *presentingView; diff --git a/MKDropdownMenu/MKDropdownMenu.m b/MKDropdownMenu/MKDropdownMenu.m index c625a86..919a121 100644 --- a/MKDropdownMenu/MKDropdownMenu.m +++ b/MKDropdownMenu/MKDropdownMenu.m @@ -1049,6 +1049,7 @@ - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { + self.intrinsicContentSize = frame.size; [self setup]; } return self;