clarifired API with generics

This commit is contained in:
Michael Starke
2018-03-02 15:41:15 +01:00
parent 033deacfdc
commit 24f11dccfd
2 changed files with 2 additions and 2 deletions

View File

@@ -41,6 +41,6 @@ typedef NS_OPTIONS(NSUInteger, MPContextMenuItemsFlags) {
Creates an array of menuitems to be used as a menu
Automatically sets up actions, so you need to take care of the responder chain
*/
+ (NSArray *)contextMenuItemsWithItems:(MPContextMenuItemsFlags)flags;
+ (NSArray <NSMenuItem *> *)contextMenuItemsWithItems:(MPContextMenuItemsFlags)flags;
@end

View File

@@ -33,7 +33,7 @@ static void MPContextmenuHelperBeginSection(NSMutableArray *items) {
@implementation MPContextMenuHelper
+ (NSArray *)contextMenuItemsWithItems:(MPContextMenuItemsFlags)flags {
+ (NSArray<NSMenuItem *> *)contextMenuItemsWithItems:(MPContextMenuItemsFlags)flags {
BOOL const insertCreate = MPIsFlagSetInOptions(MPContextMenuCreate, flags);
BOOL const insertDelete = MPIsFlagSetInOptions(MPContextMenuDelete, flags);