UITableView design similar to Twitter

I am trying to reproduce the Twitter UITableView design (see image below):

enter image description here

Could not play it: (

I tried several methods like:

  • UITableViewController with self.view.layer.borderWidth = 3.0f + shadow + cornerRadius
  • UITableViewController with Group Style and Angular Radius
  • UIView with a UITableView as subordinate and corner radius

Any clue to solve my problem please?

Thanks in advance for your help.

+4
source share
2 answers

In my opinion, this is apparently not your classic UITableView grouped style.

It can be a UITableView (simple style) that spans the entire width of the device and consists of a custom UITableViewCell. The cells are narrow enough to leave room for the scroll indicators to display.

Each UITableViewCell displays a UIImage against the background of the cell: each is different, depending on the position - top, middle, bottom - or the type of content. The image for the cell background will already contain shadows. In my experience, using Quartz for shadow is too processor intensive and slow, iphone 4). In addition, each custom cell can also have its own setOpaque: TRUE look to improve performance (against a solid background).

Each tweet cell can span different lines / heights, so you'll probably use [UIColor colorWithPatternImage: [UIImage imageNamed: @ "tile.png"]] when setting the cell background.

So, we do not have real shadow / processor material. Simple graphics, color matching and positioning.

+4
source

This is very similar to twitter UI

https://github.com/vicpenap/PrettyKit

+2
source

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


All Articles