使用 Sparkle 实现 macOS 应用自定义更新弹窗

时间:2024-11-14 07:34:55
class UpdateNotificationWindow: NSPanel { private let stackView = NSStackView() private let titleLabel = NSTextField() private let messageLabel = NSTextField() private let progressBar = NSProgressIndicator() private var buttons: [NSButton] = [] init() { super.init(contentRect: NSRect(x: 0, y: 0, width: 320, height: 240), styleMask: [.nonactivatingPanel, .titled