如何为WKWebView for Mac应用程序创建选项卡之类的Web浏览器? [目标C]

时间:2019-04-05 07:51:14

标签: objective-c macos cocoa tabs wkwebview

我的result1 <- my_tbl %>% split(.$Col_1) %>% map(~ ggplot(data.frame(x = seq(0, 30)), aes(x)) + ggtitle(.$Col_1[1]) + stat_function(fun = function(x) .x$Col_3[1] + .x$Col_3[2] * x + .x$Col_3[3] * x^2)) result2 <- my_tbl %>% nest(-Col_1) %>% mutate(plot = map2(data, Col_1, ~ ggplot(data.frame(x = seq(0, 30)), aes(x)) + ggtitle(.y) + stat_function(fun = function(x) .x$Col_3[1] + .x$Col_3[2] * x + .x$Col_3[3] * x^2))) # resulting plots are the same cowplot::plot_grid(plotlist = result1) cowplot::plot_grid(plotlist = result2$plot) 中已经有一个Webview。现在,我需要实现Safari之类的选项卡(例如)。我搜索了一些,但没有找到Mac app的任何一个。我发现某些库太旧了,无法将其更改为运行状态。我为Cocoa App iOS apps找到了很多东西。有没有提供网页视图标签的解决方案?

如果这是一个重复的问题,请至少提一下原文!

目标-C请

1 个答案:

答案 0 :(得分:0)

对于标签,NSWindow提供了您需要的所有功能。基本上,您可以免费获得选项卡,包括用户将选项卡拖放到窗口的功能,反之亦然。 为了将多个窗口/选项卡组合在一起,UI委托中有webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:,它告诉您如何打开新窗口/选项卡,并为您提供了设置Web视图的机会。