mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-12-04 05:52:03 +03:00
21 lines
511 B
Swift
21 lines
511 B
Swift
//
|
|
// NSSavePanelExtensions.swift
|
|
// eqMac
|
|
//
|
|
// Created by Romans Kisils on 20/06/2019.
|
|
// Copyright © 2019 Romans Kisils. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import AppKit
|
|
|
|
extension NSSavePanel {
|
|
func saveFile(extensions: [String]?, _ handler: @escaping (NSApplication.ModalResponse) -> Void) -> Void {
|
|
title = "Save File"
|
|
canCreateDirectories = true
|
|
allowedFileTypes = extensions
|
|
allowsOtherFileTypes = false
|
|
begin(completionHandler: handler)
|
|
}
|
|
}
|