A
A
Aleksandr Govorukhin2017-06-04 17:30:13
HTML
Aleksandr Govorukhin, 2017-06-04 17:30:13

How to create a dynamic UIImageView in Swift 3?

Hello! There is an array of images stored in Core Data, each object has its own number of images, how to create a dynamic number of UIImageView for each image? For example, there is some text and under it I will display my number of any images.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dicem, 2018-09-28
@kamisarlapsha

There was such a task, first you type this block on the grid:

<div class="col-lg-5">
  <div class="redBlock">
    <p>Lorem Ipsum</p>
  </div>
</div>

.redBlock{
  background: red;
  color: white;
  padding: 20px;
  font: ...;
}

Next, create another block side by side inside the col-lg-5 column and make it absolute, parent relative respectively. Here, of course, you have to do something called body overflow-x: hidden;
<div class="col-lg-5">
  <div class="redBlock">
    <p>Lorem Ipsum</p>
  </div>
  <div class="fakeBlock"></div>
</div>

body{ overflow-x: hidden }
.redBlock{
  background: red;
  color: white;
  padding: 20px;
  font: ...;
}
.fakeBlock{
  top: 0;
  left: 0;
  height: 100%;
  width: 99999px; // Тут кароч это все дело съедет к аллаху на 9999 пикселей и растянетсякак тебе надо без полосы прокрутки

I solved the problem like this, I didn’t test it myself right now, so I’m waiting for feedback, it seems that I didn’t have a big problem with the height of the fake block block, you should also have it.

A
Anton Gorb, 2017-06-06
@SnapSh0t

Use collectionView
ios-simulator-screenshot-31-jul-2015-6-

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question