mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
This commit is contained in:
31
iOS/MasterTimeline/UndoAvailableAlertController.swift
Normal file
31
iOS/MasterTimeline/UndoAvailableAlertController.swift
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// UndoAvailableAlertController.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Phil Viso on 9/29/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
struct UndoAvailableAlertController {
|
||||
|
||||
static func alert(handler: @escaping (UIAlertAction) -> Void) -> UIAlertController {
|
||||
let title = NSLocalizedString("Undo Available", comment: "Undo Available")
|
||||
let message = NSLocalizedString("You can undo this and other actions with a three finger swipe to the left.",
|
||||
comment: "Mark all articles")
|
||||
let cancelTitle = NSLocalizedString("Cancel", comment: "Cancel")
|
||||
let confirmTitle = NSLocalizedString("Got It", comment: "Got It")
|
||||
|
||||
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
||||
let cancelAction = UIAlertAction(title: cancelTitle, style: .cancel)
|
||||
let markAction = UIAlertAction(title: confirmTitle, style: .default, handler: handler)
|
||||
|
||||
alertController.addAction(cancelAction)
|
||||
alertController.addAction(markAction)
|
||||
|
||||
return alertController
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user