PSPDFStatusHUDItem
@interface PSPDFStatusHUDItem : 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 (readwrite, copy, nonatomic, nullable) NSString *title;
Swift
var title: String? { get set }
-
The subtitle to display. Can be nil.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *subtitle;
Swift
var subtitle: String? { get set }
-
The main text to display. Can be nil.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, 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 (assign, readwrite, nonatomic) CGFloat progress;
Swift
var progress: CGFloat { get set }
-
An attached view.
Declaration
Objective-C
@property (assign, readwrite, nonatomic, nullable) UIView *view;
Swift
var view: UIView? { get set }
-
The item’s delegate to handle actions. Can be nil.
Declaration
Objective-C
@property (readwrite, nonatomic) 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: PSPDFStatusHUDStyle)
-
Show the HUD item.
Declaration
Objective-C
- (void)pushAnimated:(BOOL)animated completion:(nullable void (^)(void))completion;
Swift
func push(animated: Bool, completion: (() -> Void)? = nil)
-
Show the HUD item and schedule a dismissal time.
Declaration
Objective-C
- (void)pushAndPopWithDelay:(NSTimeInterval)interval animated:(BOOL)animated completion:(nullable void (^)(void))completion;
Swift
func pushAndPop(withDelay interval: TimeInterval, animated: Bool, completion: (() -> Void)? = nil)
-
Hide the HUD item.
Declaration
Objective-C
- (void)popAnimated:(BOOL)animated completion:(nullable void (^)(void))completion;
Swift
func pop(animated: Bool, completion: (() -> Void)? = nil)