我想将分隔符从 UITableView 更改为虚线。我能找到的只是
UITableViewCellSeparatorStyleBlabla...
我可以放别的东西代替吗?我宁愿不使用图像,但如果没有其他方法......
Thanks!
尝试以下解决方案:
self.tableView.separatorColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Dottedlineimage"]];
note:不要忘记关闭表视图的默认分隔符样式两个解决方案: [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
=====================或者试试这个========================== =================
UIImageView *aLine = [[UIImageView alloc] initWithFrame:CGRectMake(cell.frame.origin.x, cell.frame.origin.y, cell.frame.size.width, cell.frame.size.height)];
[aLine setImage:[UIImage imageNamed:@"yourDottedImage.png"]];
[cell.contentView addSubview:aLine];
[aLine release];
很高兴能帮助你:)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)