Huang Runhua
Huang Runhua

Reputation: 156

How to make the NSMenuItem's position just below New Folder item in FinderSync?

I override the menu(for menuKind: FIMenuKind) shows in the following:

override func menu(for menuKind: FIMenuKind) -> NSMenu {
    let menu = NSMenu(title: "")
    let menuItem = NSMenuItem(title: "❤️", action: nil, keyEquivalent: "")
    menuItem.submenu = NSMenu(title: "")
        
    let watchMenuItem = NSMenuItem(title: "⌚️", action: nil, keyEquivalent: "")
    menuItem.submenu?.items.append(watchMenuItem)

    let lightMenuItem = NSMenuItem(title: "💡", action: nil, keyEquivalent: "")
    menuItem.submenu?.items.append(lightMenuItem)

    menu.addItem(menuItem)
        
    return menu
}

Currently the two custom NSMenuItems appear in the bottom of the Finder menu, shows in the following photo: enter image description here

I want my custom NSMenuItem appear just below the New Folder button, how can I do that?

Upvotes: 2

Views: 51

Answers (0)

Related Questions