From ec609bbe7dfd0ec0f94b620e04f43760c95f88c4 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Thu, 20 Jun 2019 17:24:23 +0800 Subject: [PATCH] Adds section header background view Stops collapsing sections from appearing under the section view header. --- iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift index fd005da73..e38699c30 100644 --- a/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift +++ b/iOS/MasterFeed/Cell/MasterFeedTableViewSectionHeader.swift @@ -113,6 +113,7 @@ private extension MasterFeedTableViewSectionHeader { addSubviewAtInit(titleView) updateDisclosureImage() addSubviewAtInit(disclosureView) + addBackgroundView() } func updateDisclosureImage() { @@ -134,4 +135,9 @@ private extension MasterFeedTableViewSectionHeader { disclosureView.setFrameIfNotEqual(layout.disclosureButtonRect) } + func addBackgroundView() { + self.backgroundView = UIView(frame: self.bounds) + self.backgroundView?.backgroundColor = UIColor.systemGroupedBackground + } + }