Creating a UITableViewCell with a button to add a photo, for example, in the Contacts application

When you add a new contact, the first line contains the add photo button, and the x coordinate of the beginning of the cell is set to a value that is larger than the rest of the cells. How can I add this photo button and resize the cell?

Thanks!

+3
source share
2 answers

To do this, they use their own cell. This custom cell has a control in the form of a picture on the left and simulates a table cell next to it. This is not what goes out of the box.

You cannot set the x coordinate of the cell either; you can set the indent on the other side.

: , , , . , , headerfooter developer.apple.com .

: https://developer.apple.com/library/archive/samplecode/HeaderFooter/Introduction/Intro.html

+4

, tableHeaderView.

, . ! !

0

Source: https://habr.com/ru/post/1721788/


All Articles