简体   繁体   中英

Width UITableViewCell

I have an UITableViewController. My cell instead of this:

分隔单元格的线到达边缘

But I want that the cell is like this:

这条线没有到达最后

In the second image, the line does not reach the edge of the screen and below the photo line does not appear.

How can I do this?

Thank you!!

You can hide border with :

cell.separatorInset = UIEdgeInsetsMake(0.f, cell.bounds.size.width, 0.f, 0.0f);

and create a line under text

You can use the cell template provided by default. For example

UITablebiewCellStyleSubtitle

Set its properties and it should work.

The other option would be to create a custom cell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM