iOS UITableview Card View
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"MyCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.backgroundColor = [UIColor clearColor];
cell.accessoryType = UITableViewCellAccessoryNone;
cell.layer.shouldRasterize = YES;
cell.layer.rasterizationScale = [UIScreen mainScreen].scale;
cell.selectionStyle=UITableViewCellSelectionStyleNone;
UIView *viewForCell=[[UIView alloc] initWithFrame:CGRectMake(0, 5, screenWidth-15, 95)];
viewForCell.layer.shadowColor = [UIColor lightGrayColor].CGColor;
viewForCell.layer.shadowOpacity = 0.2f;
viewForCell.layer.shadowOffset = CGSizeMake(5.0f, 5.0f);
viewForCell.layer.shadowRadius = 0.0f;
viewForCell.backgroundColor = [UIColor whiteColor];
viewForCell.layer.borderWidth=0.2f;
viewForCell.layer.cornerRadius=5;
viewForCell.layer.borderColor=[[UIColor lightGrayColor]CGColor];
[cell.contentView addSubview:viewForCell];
//Create UIElements here
return cell
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 110;
}