2019-10-08 02:33:30 +02:00
|
|
|
//
|
2019-10-10 22:13:20 +02:00
|
|
|
// UndoAvailableAlertController.swift
|
2019-10-08 02:33:30 +02:00
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Phil Viso on 9/29/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import UIKit
|
|
|
|
|
2019-10-10 22:13:20 +02:00
|
|
|
struct UndoAvailableAlertController {
|
2019-10-08 04:13:00 +02:00
|
|
|
|
2019-10-10 22:13:20 +02:00
|
|
|
static func alert(handler: @escaping (UIAlertAction) -> Void) -> UIAlertController {
|
|
|
|
let title = NSLocalizedString("Undo Available", comment: "Undo Available")
|
2019-10-08 04:13:00 +02:00
|
|
|
let message = NSLocalizedString("You can undo this and other actions with a three finger swipe to the left.",
|
|
|
|
comment: "Mark all articles")
|
2019-10-08 02:33:30 +02:00
|
|
|
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
2019-10-08 04:13:00 +02:00
|
|
|
let confirmTitle = NSLocalizedString("Got It", comment: "Got It")
|
2019-10-08 02:33:30 +02:00
|
|
|
|
|
|
|
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
|
|
|
let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel)
|
2019-10-08 04:13:00 +02:00
|
|
|
let markAction = UIAlertAction(title: confirmTitle, style: .default, handler: handler)
|
2019-10-08 02:33:30 +02:00
|
|
|
|
|
|
|
alertController.addAction(cancelAction)
|
|
|
|
alertController.addAction(markAction)
|
|
|
|
|
|
|
|
return alertController
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|