From d732a25ba5d7ee2229d35729c431991fcc8c7799 Mon Sep 17 00:00:00 2001 From: devedbox Date: Thu, 6 Apr 2017 10:13:54 +0800 Subject: [PATCH] Added accessibility to the background label to handle label in a simple way. --- .../AXWebViewController/AXWebViewController.h | 9 +++++++++ .../AXWebViewController/AXWebViewController.m | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.h b/AXWebViewController/AXWebViewController/AXWebViewController.h index 27fa8e6..fad0231 100644 --- a/AXWebViewController/AXWebViewController/AXWebViewController.h +++ b/AXWebViewController/AXWebViewController/AXWebViewController.h @@ -195,4 +195,13 @@ typedef NS_ENUM(NSInteger, AXWebViewControllerNavigationType) { /// @param completion completion block. + (void)clearWebCacheCompletion:(dispatch_block_t)completion; @end + +/** + Accessibility to background label. + */ +@interface AXWebViewController (BackgroundLabel) +/// Description label of web content's info. +/// +@property(readonly, nonatomic) UILabel *descriptionLabel; +@end NS_ASSUME_NONNULL_END diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.m b/AXWebViewController/AXWebViewController/AXWebViewController.m index 9ce1ceb..beef102 100644 --- a/AXWebViewController/AXWebViewController/AXWebViewController.m +++ b/AXWebViewController/AXWebViewController/AXWebViewController.m @@ -548,6 +548,10 @@ - (UILabel *)backgroundLabel { [_backgroundLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; return _backgroundLabel; } + +- (UILabel *)descriptionLabel { + return self.backgroundLabel; +} #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0 -(UIView*)swipingBackgoundView{ if (!_swipingBackgoundView) {