tableView的一些属性设置

2017-06-01  本文已影响4人  月见汪

//滚动条不显示

self.tableview.showsVerticalScrollIndicator = NO;

//tableview添加阴影

_tableview.layer.shadowOffset = CGSizeMake(0, 0);

_tableview.layer.shadowColor = [UIColor colorWithHexString:@"#7B7B7B"].CGColor;

_tableview.layer.shadowOpacity = 0.4;

_tableview.separatorColor = [UIColor colorWithWhite:0.3 alpha:0.2];

_tableview.clipsToBounds = NO;

// 选中后不让cell保持选中状态

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

// 选中后不让cell保持选中状态

[tableView deselectRowAtIndexPath:indexPath animated:YES];

}

上一篇 下一篇

猜你喜欢

热点阅读