Skip to content

Instantly share code, notes, and snippets.

@rcfrias
Last active August 29, 2015 14:07
Show Gist options
  • Save rcfrias/d0da0b5d44191c65101e to your computer and use it in GitHub Desktop.
Save rcfrias/d0da0b5d44191c65101e to your computer and use it in GitHub Desktop.
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];
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment