QMUIEmptyView
@interface QMUIEmptyView : UIView
通用的空界面控件,支持显示 loading、标题和副标题提示语、占位图片,QMUICommonViewController 内已集成一个 emptyView,无需额外添加。
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIView<QMUIEmptyViewLoadingViewProtocol> *loadingView
Swift
var loadingView: (UIView & QMUIEmptyViewLoadingViewProtocol)! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong, readonly) UIImageView *imageView
Swift
var imageView: UIImageView! { get }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong, readonly) UILabel *textLabel
Swift
var textLabel: UILabel! { get }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong, readonly) UILabel *detailTextLabel
Swift
var detailTextLabel: UILabel! { get }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong, readonly) QMUIButton *actionButton
Swift
var actionButton: QMUIButton! { get }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) UIEdgeInsets imageViewInsets
Swift
var imageViewInsets: UIEdgeInsets { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) UIEdgeInsets loadingViewInsets
Swift
var loadingViewInsets: UIEdgeInsets { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) UIEdgeInsets textLabelInsets
Swift
var textLabelInsets: UIEdgeInsets { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) UIEdgeInsets detailTextLabelInsets
Swift
var detailTextLabelInsets: UIEdgeInsets { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) UIEdgeInsets actionButtonInsets
Swift
var actionButtonInsets: UIEdgeInsets { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, assign) CGFloat verticalOffset
Swift
var verticalOffset: CGFloat { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIFont *textLabelFont
Swift
var textLabelFont: UIFont! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIFont *detailTextLabelFont
Swift
var detailTextLabelFont: UIFont! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIFont *actionButtonFont
Swift
var actionButtonFont: UIFont! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIColor *textLabelTextColor
Swift
var textLabelTextColor: UIColor! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIColor *detailTextLabelTextColor
Swift
var detailTextLabelTextColor: UIColor! { get set }
-
Undocumented
Declaration
Objective-C
@property(nonatomic, strong) UIColor *actionButtonTitleColor
Swift
var actionButtonTitleColor: UIColor! { get set }
-
Undocumented
Declaration
Objective-C
- (void)setLoadingViewHidden:(BOOL)hidden;
Swift
func setLoadingViewHidden(_ hidden: Bool)
-
设置要显示的图片
Declaration
Objective-C
- (void)setImage:(UIImage *)image;
Swift
func setImage(_ image: UIImage!)
Parameters
image
要显示的图片,为nil则不显示
-
设置提示语
Declaration
Objective-C
- (void)setTextLabelText:(NSString *)text;
Swift
func setTextLabelText(_ text: String!)
Parameters
text
提示语文本,若为nil则隐藏textLabel
-
设置详细提示语的文本
Declaration
Objective-C
- (void)setDetailTextLabelText:(NSString *)text;
Swift
func setDetailTextLabelText(_ text: String!)
Parameters
text
详细提示语文本,若为nil则隐藏detailTextLabel
-
设置操作按钮的文本
Declaration
Objective-C
- (void)setActionButtonTitle:(NSString *)title;
Swift
func setActionButtonTitle(_ title: String!)
Parameters
title
操作按钮的文本,若为nil则隐藏actionButton
-
如果要继承QMUIEmptyView并添加新的子 view,则必须:
- 像其它自带 view 一样添加到 contentView 上
- 重写sizeThatContentViewFits
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *contentView;
Swift
var contentView: UIView! { get }
-
Undocumented
Declaration
Objective-C
- (CGSize)sizeThatContentViewFits;
Swift
func sizeThatContentViewFits() -> CGSize