0

I'm trying to display an image with a tableView like so (see image below).

But I'm not sure about the way to implement the red part :

  • is the red part in the header part of the table view ?
  • is the red part outside of the table view ?
  • is this in a custom cell ?

enter image description here

PS : Note that the tableView I would like to be with the picture would have various sections.

Thank you very much for the help.

narner
  • 2,908
  • 3
  • 26
  • 63
Reveclair
  • 2,399
  • 7
  • 37
  • 59
  • Create a view and add these image and all element and then add as tableview header – Kishore Suthar Jul 01 '15 at 13:44
  • Use a UIViewController and add a UITableView to the view below where you intend to put the image. Please see this answer which is similar to your problem http://stackoverflow.com/a/25630674/2507277 – Jim Tierney Jul 01 '15 at 13:46

2 Answers2

2

In this case it's either a header or a custom UITableViewCell because it scrolls with the table. You can implement it either way.

Personally I'd start by making it a cell. That will allow you to use autolayout to easily tackle sizing and dynamic type.

Travis
  • 3,373
  • 20
  • 19
  • Ok thank you very much ! I solved this by making a custom cell in the header of the tableView (otherwise (when that was the first row) they were separators lines around this first cell and this was not wanted). – Reveclair Jul 07 '15 at 06:32
0

create a custom view as per suthar's comment and add it to the tableview headerview , if you have more than one sections than u can use the groupped tableview instead of plain tableview...it becomes more easy..

Ketan Jogal
  • 58
  • 10