ios - Multiple ImageView controls display problem
给我你的怀抱
给我你的怀抱 2017-05-17 10:06:32
0
4
734

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. .

给我你的怀抱
给我你的怀抱

reply all(4)
大家讲道理

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template