ClashX.Meta/ClashX/Basic/NSUserNotificationCenter+Ex...

23 lines
649 B
Swift
Raw Normal View History

//
// NSUserNotificationCenter+Extension.swift
// ClashX
//
// Created by CYC on 2018/8/6.
2018-08-08 13:47:38 +08:00
// Copyright © 2018 yichengchen. All rights reserved.
//
import Cocoa
extension NSUserNotificationCenter {
func post(title:String,info:String) {
let notification = NSUserNotification()
notification.title = title
notification.informativeText = info
self.deliver(notification)
}
func postGenerateSimpleConfigNotice() {
self.post(title: "No External-controller specified in config file!", info: "We have replace current config with a simple config with external-controller specified!")
}
}