diff --git a/WMPageController.podspec b/WMPageController.podspec index 8b09a68..bb9ae66 100755 --- a/WMPageController.podspec +++ b/WMPageController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WMPageController" - s.version = "2.5.2" + s.version = "2.5.3" s.summary = "An easy solution to page controllers like NetEase News" s.homepage = "https://github.com/wangmchn/WMPageController" s.license = 'MIT (LICENSE)' diff --git a/WMPageController/WMPageController.h b/WMPageController/WMPageController.h index 0836c95..75e0dee 100755 --- a/WMPageController/WMPageController.h +++ b/WMPageController/WMPageController.h @@ -304,6 +304,9 @@ extern NSString *const WMControllerDidFullyDisplayedNotification; /** 内部容器 */ @property (nonatomic, nullable, weak) WMScrollView *scrollView; +/** 内部容器背景色 */ +@property (nonatomic, nullable, weak) UIColor *scrollViewBackgroundColor; + /** MenuView 内部视图与左右的间距 */ @property (nonatomic, assign) CGFloat menuViewContentMargin; diff --git a/WMPageController/WMPageController.m b/WMPageController/WMPageController.m index b72c62a..df8a56a 100755 --- a/WMPageController/WMPageController.m +++ b/WMPageController/WMPageController.m @@ -430,7 +430,7 @@ - (void)wm_addScrollView { WMScrollView *scrollView = [[WMScrollView alloc] init]; scrollView.scrollsToTop = NO; scrollView.pagingEnabled = YES; - scrollView.backgroundColor = [UIColor whiteColor]; + scrollView.backgroundColor = (self.scrollViewBackgroundColor ?: [UIColor whiteColor]); scrollView.delegate = self; scrollView.showsVerticalScrollIndicator = NO; scrollView.showsHorizontalScrollIndicator = NO;