简体   繁体   中英

Apple Swift MacOS - How to Show Help Book?

How to open the Help Book of a MacOS app?

I found showHelp() but that's not in scope in my app.

showContextHelp() is in scope but that doesn't open the Help Book.

showHelp() docs: https://developer.apple.com/documentation/appkit/nsapplication/1500910-showhelp

The answer by @helioz here worked:

To call an anchor is swift 4: NSHelpManager.shared.openHelpAnchor(NSHelpManager.AnchorName(rawValue:"MyAnchor"), inBook: NSHelpManager.BookName(rawValue: "com.company.App.help") ) – helioz Mar 13 '18 at 12:59

From: Anchors in help-book not working

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM