简体   繁体   中英

What type of view is the Twitter profile on iOS? UITableView?

Is the twitter profile view in iOS just ONE very dynamic table view? What's in the header and what's in the cells? I've just started developing for iOS and I'm trying to look at the big players and identify what they use and how they use it.
I've made a similar view, but it's a view comprised of carefully placed subviews, and I'm wondering if something like this would be a better route.

If it is a UITableView, how do they have such dynamic cells with different spacing between them etc? I know you can vary cell sizes, layouts, and insets, but to this degree, in one tableview?

Please don't jump me with downvotes for asking a non-technical question only twitter devs know for sure, I'm just really curious and don't know where else to ask. I'm only looking for a professional opinion.

个人资料顶部

个人资料向下滚动

It looks like it could be a very dynamic UITableView to me. Or at least, it could probably be recreated as a UITableView if it isn't already.

I'm looking at a twitter profile page now, and I would say there's probably 5 sections:

  1. Header (everything from the profile picture to the "follow" button)
  2. Recent Tweets (including the "view more" button)
  3. Photos
  4. "Special" items (Following, Followers, Favorites and Lists)
  5. Who to Follow

The only component of this view that strikes me as particularly unique and special is the banner image that blurs and zooms when you pull down too far. I'm not quite sure how they pulled that off. It's possible that they track the offset of the scroll view, and if the offset is positive (ie it was pulled down), then zoom and blur the banner (and use the offset value as a scaling factor somehow).

All the other components could be probably be recreated by (carefully) designing custom UITableViewCells for each unique purpose (eg tweets, image carousel, other profiles), and then populating those cells with data from the tweet or profile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM