Facebook-esque (iOS) News Feed Custom UITableCell
I am building an iOS app using Swift which will have a News Feed component. After some research, it seems that the best way to do this is to use a UITableView with custom cell designs. If you look at the current iOS Facebook app, their news feed style is what I need. I'm not 100% sure they are not using the HTML5 framework, but still.
I created a conceptual image of how I would like me to look.
As you can see, the "content" part of the table cell must be responsive / able to "grow" with the content. The header and footer will be static in height.
The content will also contain text and / or images as shown below.
Any ideas?
source to share
It seems the UITableview can be very slow as it has to display the cells all the time while scrolling. Take a look at the ComponentKit https://code.facebook.com/posts/1415586422080360/introducing-componentkit-functional-and-declarative-ui-on-ios/ . Good luck and tell me if you find something better ...
source to share
In the datasource, when you set the height of a table cell, could you put something in there that says instead of a static number for the height, you could find out how many things the cell should hold, then adjust the height based on that?
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat
{
var height = getNumberOfObjects()
height = height * 10
return height
}
Something like that? I'm not sure if the syntax is correct.
source to share