3

I would like to have the same effect on the table view line separators shown in Notification Center. If you pay close attention to them they don't have a solid colour and it's not an image either.

enter image description here

Anyone have a good idea how I can do the same?

Thanks

4

3 回答 3

2

Here is a sample project that shows one possible way to achieve this kind of effect with public API.

https://github.com/mikrohard/BluredTableView

于 2013-10-26T22:20:29.367 回答
0

First create a custom table view cell with a transparent background. Then add a thin UIView to the bottom/top of the cell as the separator. Make its background color white and make it semi-transparent.

于 2013-10-05T15:03:50.080 回答
0
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath  *)indexPath
{
     UIImageView *sepImgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"colored_line.png"]];
     sepImgView.frame = CGRectMake(20, myCellHeight, myCellWidth, 1);
     [cell.contentView addSubview:sepImgView];
     return cell; 
}

And you need to set your seperator style to UITableViewCellSeparatorStyleNone

于 2013-10-05T15:08:42.980 回答