Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ALLoadingView/Source/ALLoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public class ALLoadingView: NSObject {
public lazy var messageFont: UIFont = UIFont.systemFont(ofSize: 25.0)
/// Text message. "Loading" by default.
public lazy var messageText: String = "Loading"
/// Text cancel button. "Cancel" by default.
public lazy var cancelText: String = "Cancel"
/// Read-only flag for checking is loading view is presented on screen. Also returns TRUE during disappearance/appearance animation.
public var isPresented: Bool {
return loadingViewPresented
Expand Down Expand Up @@ -344,7 +346,7 @@ public class ALLoadingView: NSObject {

for view in subviews {
if view is UIButton {
(view as! UIButton).setTitle("Cancel", for: UIControl.State())
(view as! UIButton).setTitle(cancelText, for: UIControl.State())
(view as! UIButton).addTarget(self, action: #selector(ALLoadingView.cancelButtonTapped(_:)), for: .touchUpInside)
}
}
Expand All @@ -357,7 +359,7 @@ public class ALLoadingView: NSObject {

for view in subviews {
if view is UIButton {
(view as! UIButton).setTitle("Cancel", for: UIControl.State())
(view as! UIButton).setTitle(cancelText, for: UIControl.State())
(view as! UIButton).addTarget(self, action: #selector(ALLoadingView.cancelButtonTapped(_:)), for: .touchUpInside)
}
}
Expand Down