如何为macOS创建浮动搜索框

时间:2017-06-07 19:13:25

标签: swift macos

如何使用像Spotlight和Alfred这样的Swift为macOS创建浮动搜索框?

Alfred search box

1 个答案:

答案 0 :(得分:-1)

我们可以将ScalaFX用于此目的

object Main extends JFXApp {
  val resource = getClass.getResource("/box.fxml")
  val root = FXMLView(resource, new GuiceDependencyResolver())

  stage = new PrimaryStage() {
    initStyle(StageStyle.Undecorated) // this option removes the default header
    title = "Cats"
    scene = new Scene(root)
  }
}