To show 25 images randomly out of 40 images in a grid view

前端 未结 4 975
醉梦人生
醉梦人生 2021-01-24 15:45

I am creating an iphone app in which I need to create a grid view of 25 images. I am doing that by taking 25 images in an array, and displaying them by using for loop by changin

4条回答
  •  无人及你
    2021-01-24 16:10

    int random = arc4random() % 40;
    

    gives a random number between 0 to 40, from that you choose the image

提交回复
热议问题