Latest 0.2.0
Homepage https://github.com/timbodeit/KeepBackgroundCell
License MIT
Platforms ios 6.0, requires ARC
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Whenever a UITableViewCell is selected or highlighted, it automatically sets the backgroundColors of all its subviews to transparent.
This makes sense for many views, such as UILabels to allow the selectedBackgroundView to show through inbetween the individual letters.

However with custom views, there are many cases where the backgroundColor should be maintained on selection of highlighting of the cell.

KeepBackgroundCell provides a way to turn of this transparency "feature" on individual UITableViewCells.

Usage

Swift
import KeepBackgroundCell

let cell = < Initialize UITableViewCell >
cell.keepSubviewBackground = true
Objective-C
#import <KeepBackgroundCell/KeepBackgroundCell.h>

UITableViewCell* cell = < Initialize UITableViewCell >
cell.keepSubviewBackground = YES;

Installation

KeepBackgroundCell is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "KeepBackgroundCell"

Author

Tim Bodeit, [email protected]

KeepBackgroundCell was inspired by
this answer
by
Yatheesha B L
on stackoverflow.

License

KeepBackgroundCell is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "KeepBackgroundCell",
    "version": "0.2.0",
    "summary": "Prevent UITableViewCell from making subviews transparent on selection and highlight",
    "description": "Whenever a UITableViewCell is selected or highlighted, it automatically sets the nbackgroundColors of all its subviews to transparent. This makes sense for many views,nsuch as UILabels to allow the selectedBackgroundView to show through inbetween thenindividual letters.nnHowever with custom views, there are many cases where the backgroundColor should be nmaintained on selection of highlighting of the cell.nnKeepBackgroundCell provides a way to turn of this transparency "feature" on individual nUITableViewCells.",
    "homepage": "https://github.com/timbodeit/KeepBackgroundCell",
    "license": "MIT",
    "authors": {
        "Tim Bodeit": "[email protected]"
    },
    "source": {
        "git": "https://github.com/timbodeit/KeepBackgroundCell.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "public_header_files": "Pod/Classes/**/*.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This