-6

I am trying to assign randomly a UIImage on my viewController from an array of images. However i always get the following error like on the screenshot below:

enter image description here

dirtydanee
  • 6,081
  • 2
  • 27
  • 43

1 Answers1

-2

To get a random image from your QuoteImages array you have to first get a random value and then request that from your array

let randomValue = arc4random_uniform(10)+1
let randomImage = QuoteImages[randomValue]
Siyavash
  • 970
  • 9
  • 23