Hello, I simply have a circle, squared UIView with side size of x and corner radius x/2.
Additionally I also have 8 UIImage's with different sizes.
What do I need to have?
I need to have a function with array of images as parameter. That function will add all images inside squared UIView as UIImageViews.
Please do not draw it, just make a view with its subviews because later in the project I will need to pass that view to other devices that are in the game, and are paired via wifi/bluetooth or somehow (it will be another step of that project).
- all images should fill circle as much as possible (if there is enough space to make any image significantly bigger, then it is wrong)
- space between them and between edge of the circle should be acceptable and just nice;)
- position of any image within circle should be randomly generated.
- every image should have randomly changed size.
- rotation of any image should be randomly generated
- every image should preserve its ratio.
- every image should not be greater than A value, and should not be smaller than B value (A and B always is related and compared to the longest side of rectangle). In other words minimum size of the image cannot be less than A, and maximum cannot be greater than B.
- images (not empty pixels in png files) cannot be placed over another images even partly.
- A lot of images will be placed as PNG images. Often png image has a lot of pixels which are transparent. While you create algorithm for this, you may consider empty pixels as a free space to fulfill with any other image. If you do not fully understand what I mean, please ask.
- images (position, scale, rotation is random)
- ratio of every image is preserved
- smallest side cannot be less then 100px and and cannot be greater thatn 250px
- !!!!! Most of images are png (has a lot of transparent pixels), Please consider those pixels as a space to fill with another not transparent pixels from another image (as it is on the image above).
I will accept the project once all requirements will be filled;-) Thank you.
Example of how it should look like is on the image below. If attachment is not visible (for me it doesnt work here) please tell me then, and I will upload it to you.
- Latest Xcode
- Latest Swift