rcfrias
10/3/2014 - 2:41 AM

Setup to effectively set Transparent background on a UITableView inside another ViewController in iOS 7 and iOS 8. Included mods for defaul

Setup to effectively set Transparent background on a UITableView inside another ViewController in iOS 7 and iOS 8. Included mods for default textfield font, color and size.

// "ViewController.h"

@property (strong, nonatomic) IBOutlet UITableView *tableView;

// "ViewController.m"
// Asuming the current ViewController is a delegate for the UITableView.

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [[self tableView] setBackgroundColor:[UIColor clearColor]];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"rightMenuCell"];
    
    cell.contentView.backgroundColor = [UIColor clearColor];
    
    // Modify default textLabel Color, Font and Size
    
    cell.textLabel.textColor = [UIColor whiteColor];
    
    cell.textLabel.font = [UIFont fontWithName:@"Zapfino" size:14];
    
// ...