This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct NSTableViewWrapper: NSViewRepresentable { | |
| class Coordinator: NSObject, NSTableViewDataSource, NSTableViewDelegate { | |
| var parent: NSTableViewWrapper | |
| init(parent: NSTableViewWrapper) { | |
| self.parent = parent | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol AnyNSViewWrapper { | |
| func getView() -> NSView | |
| } | |
| // Concrete wrapper for specific NSView types | |
| struct NSViewWrapper<Content: NSView>: AnyNSViewWrapper { | |
| let content: Content | |
| func getView() -> NSView { | |
| return content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class ViewController: NSViewController { | |
| let items = Array(0..<3).map { String($0) } | |
| override func loadView() { | |
| self.view = NSView(frame: NSRect(x: 0, y: 0, width: 400, height: 300)) | |
| } | |
| override func viewDidLoad() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class ViewController: NSViewController { | |
| let items = Array(0..<30).map { String($0) } | |
| private var scrollView: NSScrollView! | |
| override func loadView() { | |
| self.view = NSView(frame: NSRect(x: 0, y: 0, width: 400, height: 300)) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FlippedView: NSView { | |
| override var isFlipped: Bool { | |
| return true | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class FlippedView: NSView { | |
| override var isFlipped: Bool { | |
| return true | |
| } | |
| } | |
| class ViewController: NSViewController { | |
| let items = Array(0..<3).map { String($0) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class FlippedView: NSView { | |
| override var isFlipped: Bool { | |
| return true | |
| } | |
| } | |
| class ViewController: NSViewController { | |
| let items = Array(0..<50).map { String($0) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class FlippedView: NSView { | |
| override var isFlipped: Bool { | |
| return true | |
| } | |
| } | |
| private class Spacer: NSView { | |
| var height: CGFloat = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| class FlippedView: NSView { | |
| override var isFlipped: Bool { | |
| return true | |
| } | |
| } | |
| private class Spacer: NSView { | |
| var height: CGFloat = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final class TabItemView: NSView { | |
| let tab: Tab | |
| var onTabHover: ((Int) -> Void)? | |
| private var firstColumnLabel: NSTextField | |
| private var seconColumnLabel: NSTextField | |
| public var swipeActionViewCenterYAnchorConstraint = NSLayoutConstraint() | |