Matching left alignment of custom & standard UITableViewCell types

前端 未结 5 2223
清歌不尽
清歌不尽 2020-12-23 17:11

I\'m defining custom UITableViewCells in a storyboard. I\'m also using some of the built in standard style cells. I need to set up constraints so that my

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 17:35

    You can implement the solution suggested by Mark purely in the storyboard:

    1. Make sure the custom cell is selected.

    2. Make sure Preserve Superview Margins is selected in the Size inspector

    3. Now select the cell's Content View

    4. Make sure Preserve Superview Margins is selected here too (see image in step 2.)

    5. Select the label (or other view) in your custom prototype cell.
    6. Constrain it's left edge 0 pixels from the margin.

提交回复
热议问题