Post not yet marked as solved
I'm developing a cocoa app runs on macOS(not iOS). And I want to open an Advertisement Web Page while users click the 'Show Advertisement' button.
My Question is: how to open a url in the system's default browser(like safari) through swift code in my app.
And there must be a way to call local browser through swift code, because the in app 'WeChat', when we click a link in that app, the system will open a safari browser and show the content of the link. My question is: how?
Thanks for your help, Best Regards.
Yours,
Alex.Zhang
Post not yet marked as solved
I'm trying to do something like hybird with WKWebView.
I finished the HTML5 pages, and let it displayed in WKWebView in a macOs App.
All things go well, but I can't input any character into the <input> field in the macOs WKWebView.
My question is: Is there any way to let the <input> field can be input text in macOs WKWebView?
FYI, follow code can enable input for the <input> field: wkWebView.load(URLRequest.init(url: URL.init(string: "http://localhost:4200")!))
FYI, follow code can't input any thing for the <input> field:
wkWebView.loadFileURL(indexUrl, allowingReadAccessTo: readAccessUrl)
How can I let the <input> field be enabled to input, with the loadFileURL method?
I'm working on the nstabview. And I called nstabview.insertTabViewItem adding 15 items.
And then I want to remove one tabViewItem one by one while I click the 'Close' button.
But my question is: while I click 'Close' button and call the nstabview.removeTabViewItem, the tab has removed, but the label not complete redraw, it only redraw the next tabItem's label beside the one I closed. How can I redraw all labels of my nstabview after I call removeTabViewItem?
The UI problem after call removeTabViewItem is here:
https:// up-task.com/images/nstabview-problem.jpg