ios I added 1000 ImageView controls using code in the ViewController control. Anyway, there are many
ImageView controls.
But when debugging, I found that only more than 10 ImageView controls can be displayed in the ViewController control, and the others are below. The ViewController control cannot be scrolled or pulled down, and all the ImageView controls below cannot be seen.
May I ask the masters, is there any way to make the ViewController control scroll, or is there any way to make a view control store a large number of controls, and all can be seen, similar to QQ, where you can scroll and see a lot of text and pictures. .
1. You can put all the pictures directly on the UIScrollView and set its contentSize height to the sum of the heights of all pictures.
2. You can also use UITableView to put a picture in each cell
3. You can also use UICollectionView to put a picture in each cell
Put it inside
UIScrollView
.If there is a lot of imageView space, it is recommended to use UITableView or UICollection to solve it and reuse cells, otherwise the memory will explode.
It is recommended to use UITableView or UITableView as a container so that the view can be reused.