Questions tagged [nsviewcontrollerrepresentable]

4 questions
8
votes
2 answers

Implement webkit with swiftUI on macOS (And create a preview of a webpage)

I'm trying to create a menubar application which shows the inbox of this site. I would like to make an easy function that opens a small popup with the url of the item (without opening safari). An inbox item would look something like this struct…
Chiel
  • 1,324
  • 1
  • 11
  • 30
2
votes
1 answer

iosMath is crashing SwiftUI

I'm trying to build a Mac App using SwiftUI where I want to display Math using IosMath. I installed it using CocoaPods and I'm able to import it. But every Time I try to get to my View Containing the MTMathUILabel my App is crashing saying :…
newb
  • 172
  • 1
  • 9
2
votes
1 answer

Using SwiftUI Coordinator with NSTableView in NSViewControllerRepresentable?

I have developed a macOS personal finance app in SwiftUI that uses NSTableViews and NSOutlineViews through the NSViewControllerRepresentable interface between SwiftUI and AppKit. I have found that the AppKit view capabilities are far superior to…
0
votes
0 answers

How do you subscribe to changes to ObservableObject from within NSViewControllerRepresentable?

I have a NSCollectionView I am trying to use with a SwiftUI application but need to access an ObservableObject (singleton) - I can access the singleton but can't seem to use Swift .observe nor can I find any reference to using ObservableObject from…
Duncan Groenewald
  • 8,496
  • 6
  • 41
  • 76