开发工具栏主要使用NSStackView,NSButton,NSImage和NSfont 。 如果您未开发MacOS应用程序可能会对这些类不熟悉,可以使用UI作为前缀的UI前缀,NS前缀主要是AppKit 。 和相关的基础类,MS前缀是斯科特,CA的相关类,CF前缀是核心动画库和核心基类 。
以下代码记录创建工具栏的关键步骤,更详细的操作可以指一些GitHub仓库,例如草图插件 - 样板等 。
├─ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────────────────────────────────_my-command.js.map├────────────────────────────────────────────────── aa.jsony由webpack和manifest.json - my-command.js02. Create a WebView container
In addition to creating nSPANELs by Cocoascript, here is recommended to quickly create a WebView container using official Sketch-module-web-view, which provides a wealth of APIs to customize the display style and behavior of the window, including Frameless Window, Drag, etc. The Bridge encapsulated the communication of the webview and plug-in layer so that you can easily send messages between "Frontend" and "The Plugin Running In Sketch).
├─ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────────────────────────────────_my-command.js.map├────────────────────────────────────────────────── aa.jsony由webpack和manifest.json - my-command.js13.创建内容页面
在整个困难中,我们终于得到了WebView,你可以发挥你的想象力“天马” 。 它是反应还是Vue,或者只有一些简单的静态页面不应为您留下 。 完成界面开发后,只需通过窗口向插件发送指令 。 以下示例演示了构建块插件的“数据填充”功能 。
UI方面
├─ ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─────────────────────────────────_my-command.js.map├────────────────────────────────────────────────── aa.jsony由webpack和manifest.json - my-command.js
- 汽车是前轮驱动还是后轮驱动 前轮驱动和后轮驱动的区别是什么?
- 在汽车行业混了这么多年这些缩写不知道说不过去吧 照片
- 混动汽车的电池可以用多久 混动汽车多久换电瓶?
- 北京现代汽车电瓶多久换一次 北京现代电瓶多久换?
- 如何让汽车省油?
- 一个三角叉的车标是什么车 一个叉的车标是什么汽车?
- 君马汽车属于哪个公司旗下 君马汽车属于哪个公司旗下?
- 汽车缺玻璃水什么标志 汽车玻璃水装置在什么位置?
- 小汽车水箱多久加水 朗行水箱多久加水?
- TOYOTA是丰田哪款vios toyota是丰田哪款汽车?
特别声明:本站内容均来自网友提供或互联网,仅供参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
