It can scroll up and down. The bottom layer must be based on UIScrollView. However, the implementation of the mixed graphics and text components requires related encapsulation by itself.
I feel like you are thinking too complicated. Break down the problem and think about it.
First of all, scrolling up and down is the effect of the whole screen View, Then, the mixed arrangement of pictures and text is the effect of the content.
Similar to the effect you mentioned, uitableView is generally used to do this, and the content is displayed in the tableviewcell. Whether the content is text, pictures, or both, that is the result of customizing the tableviewcell.
Don’t be intimidated by the same responsible page. Compare the effect you see with the basic view provided by the system, analyze and decompose the functions, and you will roughly know how to implement it.
I see that there are quite a lot of answers. In order to avoid confusion, let me explain: UIScrollView, UITableView, and UICollectionView are all acceptable! And the effect achieved can be exactly the same!
UIScrollView
UIScrollView is the parent class of the latter two. It only implements the scrolling effect. You need to calculate the position of the View yourself according to your needs.
UITableView
And UITableView implements a very convenient API to implement list scrolling layout, which can meet your needs.
UICollectionView
UICollectionView is a more abstract encapsulation that can easily implement multi-element layout, including your needs.
It is recommended that you have a deeper understanding of UITableView and UICollectionView, both of which are very commonly used components!
Using UIScrollView is more troublesome because you have to manually calculate the coordinates of each view; using UITableView is more convenient as you only need to give the height of each view according to indexPath.row; UICollectionView is troublesome and I generally don’t use it much...
The simplest and most practical implementation is to use UITableView; UIScrollView can also be implemented, and you need to calculate the position yourself (if you find it simple, you can also use UIScrollView); UICollectionView is still not useful for such an interface, and its usage scenarios need to be analyzed in detail.
It can scroll up and down. The bottom layer must be based on UIScrollView. However, the implementation of the mixed graphics and text components requires related encapsulation by itself.
For example: FTCoreText
tableView nested tableView
I feel like you are thinking too complicated. Break down the problem and think about it.
First of all, scrolling up and down is the effect of the whole screen View,
Then, the mixed arrangement of pictures and text is the effect of the content.
Similar to the effect you mentioned, uitableView is generally used to do this, and the content is displayed in the tableviewcell. Whether the content is text, pictures, or both, that is the result of customizing the tableviewcell.
Don’t be intimidated by the same responsible page. Compare the effect you see with the basic view provided by the system, analyze and decompose the functions, and you will roughly know how to implement it.
I see that there are quite a lot of answers. In order to avoid confusion, let me explain:
UIScrollView, UITableView, and UICollectionView are all acceptable! And the effect achieved can be exactly the same!
UIScrollView
UIScrollView is the parent class of the latter two. It only implements the scrolling effect. You need to calculate the position of the View yourself according to your needs.
UITableView
And UITableView implements a very convenient API to implement list scrolling layout, which can meet your needs.
UICollectionView
UICollectionView is a more abstract encapsulation that can easily implement multi-element layout, including your needs.
It is recommended that you have a deeper understanding of UITableView and UICollectionView, both of which are very commonly used components!
Using UIScrollView is more troublesome because you have to manually calculate the coordinates of each view; using UITableView is more convenient as you only need to give the height of each view according to indexPath.row; UICollectionView is troublesome and I generally don’t use it much...
The simplest and most practical implementation is to use UITableView; UIScrollView can also be implemented, and you need to calculate the position yourself (if you find it simple, you can also use UIScrollView); UICollectionView is still not useful for such an interface, and its usage scenarios need to be analyzed in detail.