generated from Awesomeplayer165/Template
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Awesomeplayer165 edited this page Mar 6, 2022
·
6 revisions
A small pill that presents a view on an asynchronous on-going task, the state of an asynchronous task, or instant task
PillboxView shows a small bubble, pill looking rounded box that slides in from the top of the screen. You most likely have seen this throughout iOS when the ringer state is changed, Airpods are connected and when you copy your Discord ID, among others. This provides users with assurance that things are happening behind the works and helps bring safely reporting background proccesses to the main UI.
- class
PillView
- A UIView to display two forms of dynamic content based on the conditions or needs of a developer.
- enum
PillShowType
- Indicates the type of information that the
PillView
is showing.
- Indicates the type of information that the
- func
showTask(message: String, vcView: UIView)
- Starts the acknowledgement of the asynchronous task to the main UI
- func
completedTask(state: Bool, completionHandler: (() -> Void)?)
- Shows the result of your asynchronous task as a positive or negative
- func
showError(message: String, vcView: UIView)
- Starts the acknowledgement of the error of an instant task to the main UI.
- func
reveal(animated: Bool, completionHandler: (() -> Void)?)
- Hides the
pillView
to the top of the screen.
- Hides the
- func
dismiss(animated: Bool, completionHandler: (() -> Void)?)
- Hides the
pillView
to the top of the screen.
- Hides the
- init()
- init(activityIndicator: UIActivityIndicatorView)
- init(isNavigationControllerPresent: Bool)
- init(showType: PillShowType)
- init(width: Int, height: Int)
- var activityIndicator: UIActivityIndicatorView
- var errorSymbol: UIImage
- var failureSymbol: UIImage
- var height: Int
- var isAwaitingTaskCompletion: Bool
- var isNavigationControllerPresent: Bool
- var pillView: UIView
- var showType: PillShowType?
- var successSymbol: UIImage
- var titleLabel: UILabel
- var vcView: UIView?
- var width: Int
- static var activePillBoxViews: Set