0

I have an UITableViewController. My cell instead of this:

The line separated the cells reaches the edge

But I want that the cell is like this:

The line does not reach the final

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!!

1
  • you can disable the default line and you can draw a line under the image and thus you may accomplish this .. Commented Dec 27, 2015 at 16:04

2 Answers 2

1

You can hide border with :

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

and create a line under text

Sign up to request clarification or add additional context in comments.

3 Comments

There are much better ways to hide separator. Why don't you just set the inset to the value you want ,e.g. UIEdgeInsetsMake(0.f, 60.0f, 0.f, 0.0f);
the text does not reach the end of the cell.
You can insert a new line wherever you like
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.