From 287f44ffc2d0b8243a03a288d89d499dc868e10b Mon Sep 17 00:00:00 2001 From: Aliona Date: Mon, 15 Jan 2018 14:11:50 +0300 Subject: [PATCH] Edit issues for pull request --- .../UITableView/UITableView+Extensions.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Sources/Extensions/UITableView/UITableView+Extensions.swift b/Sources/Extensions/UITableView/UITableView+Extensions.swift index d2f3fab1..6c6cf7f4 100644 --- a/Sources/Extensions/UITableView/UITableView+Extensions.swift +++ b/Sources/Extensions/UITableView/UITableView+Extensions.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2017 Touch Instinct +// Copyright (c) 2018 Touch Instinct // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,14 +25,16 @@ import UIKit public extension UITableView { /// Adds colored background to the top of the tableview. - /// Use when you need a colored bounce area with a color - /// different from tableview background + /// + /// - Parameters: + /// - color: background color func addHeaderBackground(with color: UIColor) { - let backgroundFrame = CGRect(x: frame.origin.x, y: -bounds.height, + let backgroundFrame = CGRect(x: frame.origin.x, + y: -bounds.height, width: UIScreen.main.bounds.width, height: bounds.height) - let backGroundview = UIView(frame: backgroundFrame) - backGroundview.backgroundColor = color - addSubview(backGroundview) + let backgroundView = UIView(frame: backgroundFrame) + backgroundView.backgroundColor = color + addSubview(backgroundView) } }