Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could use this great tutorial <a href="http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html" rel="nofollow">http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html</a></p> <p>Basically change background image inside this method: </p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath /// some code.... UIImage *rowBackground; UIImage *selectionBackground; NSInteger sectionRows = [aTableView numberOfRowsInSection:[indexPath section]]; NSInteger row = [indexPath row]; if (row == 0 &amp;&amp; row == sectionRows - 1) { rowBackground = [UIImage imageNamed:@"topAndBottomRow.png"]; selectionBackground = [UIImage imageNamed:@"topAndBottomRowSelected.png"]; } else if (row == 0) { rowBackground = [UIImage imageNamed:@"topRow.png"]; selectionBackground = [UIImage imageNamed:@"topRowSelected.png"]; } else if (row == sectionRows - 1) { rowBackground = [UIImage imageNamed:@"bottomRow.png"]; selectionBackground = [UIImage imageNamed:@"bottomRowSelected.png"]; } else { rowBackground = [UIImage imageNamed:@"middleRow.png"]; selectionBackground = [UIImage imageNamed:@"middleRowSelected.png"]; } ((UIImageView *)cell.backgroundView).image = rowBackground; ((UIImageView *)cell.selectedBackgroundView).image = selectionBackground; // more code... </code></pre> <p>You shoud use only middle row, because this code has 3 images, one for first row, one for last row and one for middle row. Hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload