SWRLToastView Class Reference
| Inherits from | UIView |
|---|---|
| Declared in | SWRLToastView.h SWRLToastView.m |
Overview
A SWRLToastView is a floating notification view that allows the user to delete it from the screen, to move up and down and to slide it way to the right to get it out of the way. It is used by the SWRLContentManager to provide a default return to content button when the user dismisses content.
Accessing Information Attributes
title
The toast title text. Displays as the first line. If nil, it will collapse and take up no space.
@property (nonatomic, nullable) NSString *titleDeclared In
SWRLToastView.h
Controlling the Appearance
font
The font to use for all text. By default uses the systemFont
@property (nonatomic) UIFont *fontDeclared In
SWRLToastView.h
textColor
The text color for all labels. By default is nill and will derive an approriate color based on the background
@property (nonatomic) UIColor *textColorDeclared In
SWRLToastView.h
backgroundColor
The background of the toast. The default is black with a .60 alpha
@property (nonatomic) UIColor *backgroundColorDeclared In
SWRLToastView.h
displaySeconds
The time to display. Currently this field has no effect.
@property (nonatomic) NSTimeInterval displaySecondsDeclared In
SWRLToastView.h
tabAccessoryView
The view to display when the toast is in its parked right position. The default is a tab.
@property (nonatomic) UIView *tabAccessoryViewDeclared In
SWRLToastView.h
deleteAccessoryView
The view to display when the toast is in its swiped left or delete mode. The default is an X on red background
@property (nonatomic) UIView *deleteAccessoryViewDeclared In
SWRLToastView.h
swipeToDelete
Boolean to control whether the user can swipe left to delete in a single motion. Default is NO
@property (nonatomic) BOOL swipeToDeleteDeclared In
SWRLToastView.h
contentView
Background view of the toast
@property (nonatomic, readonly) UIView *contentViewDeclared In
SWRLToastView.h
titleLabel
Default titleLabel
@property (nonatomic, readonly) UILabel *titleLabelDeclared In
SWRLToastView.h
timeLabel
Default timeLabel
@property (nonatomic, readonly) UILabel *timeLabelDeclared In
SWRLToastView.h
messageLabel
Default messageLabel
@property (nonatomic, readonly) UILabel *messageLabelDeclared In
SWRLToastView.h
– initWithTitle:message:time:actionHandler:
- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message time:(NSDate *)time actionHandler:(void ( ^ ) ( SWRLToastView *view , BOOL ))actionHandlerParameters
title |
The toast view title |
|---|---|
message |
The toast view message |
time |
The toast view timestamp (optional) |
actionHandler |
The completion block that is called when the user activates the toast or deletes it. |
Declared In
SWRLToastView.h
– presentFromViewController:
Present a toast view from a controller.
- (void)presentFromViewController:(UIViewController *)vcParameters
vc |
The viewController to use as the host of the toast view. |
|---|
Declared In
SWRLToastView.h