Commit 810111cf authored by Soomin Lee's avatar Soomin Lee

VLCAlertViewController: Use static func instead of class

parent beda9be6
......@@ -32,19 +32,19 @@ typealias AlertAction = (UIAlertAction) -> Void
@objcMembers class VLCAlertViewController: UIAlertController {
class func alertViewManager(title: String,
errorMessage: String? = nil,
viewController: UIViewController) {
static func alertViewManager(title: String,
errorMessage: String? = nil,
viewController: UIViewController) {
VLCAlertViewController.alertViewManager(title: title,
errorMessage: errorMessage,
viewController: viewController,
buttonsAction: nil)
}
class func alertViewManager(title: String,
errorMessage: String? = nil,
viewController: UIViewController,
buttonsAction: [VLCAlertButton]?) {
static func alertViewManager(title: String,
errorMessage: String? = nil,
viewController: UIViewController,
buttonsAction: [VLCAlertButton]?) {
let alert = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert)
if let buttonsAction = buttonsAction {
for buttonAction in buttonsAction {
......@@ -63,11 +63,11 @@ typealias AlertAction = (UIAlertAction) -> Void
viewController.present(alert, animated: true, completion: nil)
}
class func alertManagerWithTextField(title: String, description: String? = nil,
viewController: UIViewController,
buttonsAction: [VLCAlertButton],
textFieldText: String? = nil,
textFieldPlaceholder: String? = nil) {
static func alertManagerWithTextField(title: String, description: String? = nil,
viewController: UIViewController,
buttonsAction: [VLCAlertButton],
textFieldText: String? = nil,
textFieldPlaceholder: String? = nil) {
let alert = UIAlertController(title: title, message: description, preferredStyle: .alert)
alert.addTextField(configurationHandler: { textField in
textField.placeholder = textFieldPlaceholder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment