It's little complex one but not hard. luckly we have one library called DropDown. This make this task very easy.
Add pod 'DropDown'
to your Podfile.
let dropDown = DropDown()
// The view to which the drop down will appear on
dropDown.anchorView = view // UIView or UIBarButtonItem in your case that menu button
// The list of items to display. Can be changed dynamically
dropDown.dataSource = ["Report"]
dropDown.selectionAction = { [unowned self] (index: Int, item: String) in
print("Selected item: \(item) at index: \(index)")
}
dropDown.show()
In Objective-C
DropDown *dropDown = [[DropDown alloc] init];
dropDown.selectionAction = ^(NSInteger, NSString * _Nonnull) {
//code
};
Library in Swift but you can use bridging header to use that in Objective C.
Hope this will help you