PSPDFStatusHUDItem
Objective-C
@interface PSPDFStatusHUDItem : NSObject
Swift
class StatusHUDItem : NSObject
Represents a single HUD item.
Warning
Only use this class on the main thread.-
The title to display. Can be nil.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *title;
Swift
var title: String? { get set }
-
The subtitle to display. Can be nil.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *subtitle;
Swift
var subtitle: String? { get set }
-
The main text to display. Can be nil.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *text;
Swift
var text: String? { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *actionTitle
Swift
var actionTitle: String? { get set }
-
Set if we should show progress.
Declaration
Objective-C
@property (nonatomic) CGFloat progress;
Swift
var progress: CGFloat { get set }
-
An attached view.
Declaration
Objective-C
@property (nonatomic, nullable) UIView *view;
Swift
var view: UIView? { get set }
-
The item’s delegate to handle actions. Can be nil.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFStatusHUDItemDelegate> _Nullable delegate;
Swift
weak var delegate: PSPDFStatusHUDItemDelegate? { get set }
-
Creates a status HUD item with progress, and adds an action button to it.
Declaration
Objective-C
+ (nonnull instancetype)progressWithText:(nullable NSString *)text actionTitle:(nullable NSString *)title;
Swift
class func progress(withText text: String?, actionTitle title: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
title
The title for the action associated with the HUD item.
-
Creates a status HUD item with progress.
Declaration
Objective-C
+ (nonnull instancetype)progressWithText:(nullable NSString *)text;
Swift
class func progress(withText text: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
-
Creates a status HUD item with an indeterminate progress, and adds an action button to it.
Declaration
Objective-C
+ (nonnull instancetype)indeterminateProgressWithText:(nullable NSString *)text actionTitle: (nullable NSString *)title;
Swift
class func indeterminateProgress(withText text: String?, actionTitle title: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
title
The title for the action associated with the HUD item.
-
Creates a status HUD item with an indeterminate progress.
Declaration
Objective-C
+ (nonnull instancetype)indeterminateProgressWithText:(nullable NSString *)text;
Swift
class func indeterminateProgress(withText text: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
-
Creates a status HUD item with a success indicator.
Declaration
Objective-C
+ (nonnull instancetype)successWithText:(nullable NSString *)text;
Swift
class func success(withText text: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
-
Creates a status HUD item with an error indicator.
Declaration
Objective-C
+ (nonnull instancetype)errorWithText:(nullable NSString *)text;
Swift
class func error(withText text: String?) -> Self
Parameters
text
Text that should be shown on the HUD item.
-
Creates a status HUD item with a text and an image.
Declaration
Objective-C
+ (nonnull instancetype)itemWithText:(nullable NSString *)text image:(nullable UIImage *)image;
Swift
convenience init(text: String?, image: UIImage?)
Parameters
text
Text that should be shown on the HUD item.
image
Image that should be shown on the HUD item.
-
Change how the HUD should be styled.
Declaration
Objective-C
- (void)setHUDStyle:(PSPDFStatusHUDStyle)style;
Swift
func setHUDStyle(_ style: StatusHUDItem.Style)
-
Show the HUD item on the provided window. Doesn’t do anything if the window is nil.
-
Show the HUD item on the provided window and schedule a dismissal time. If the window is nil, the completion block is still called, but no operation is performed.
Declaration
Objective-C
- (void)pushAndPopWithDelay:(NSTimeInterval)interval animated:(BOOL)animated onWindow:(nullable UIWindow *)window completion:(nullable void (^)(void))completion;
Swift
func pushAndPop(withDelay interval: TimeInterval, animated: Bool, on window: UIWindow?, completion: (() -> Void)? = nil)