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;