Changing grouped tables border radius

吃可爱长大的小学妹 提交于 2019-12-13 02:58:27

问题


Is it possible to change how radius of the grouped UITableView? The rounded corners are way to drastic for my design.


回答1:


I believe that the only way to do this is to provide your own background images for your table cells. You can provide 3 images to have a rounded feel to the UITableView like Apple Does.

in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath set the cell's backgroundView to a UIView with the image you want based on the cell index. This will allow you to set the Top, Middle and Bottom.

This is a pretty good article

http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html

just be sure to dequeueReusableCellWithIdentifier:




回答2:


No, it isn't. You can duplicate it though with a standard tableview and a couple custom background images.




回答3:


You have to change both cell.backgroundView and cell.selectedBackgroundView with a view of your choice.



来源:https://stackoverflow.com/questions/9027874/changing-grouped-tables-border-radius

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!