[Solved] Cannot Assign Value of type ‘UIImage?’ to type ‘[UIImage]’ when generating a random image


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]

solved Cannot Assign Value of type ‘UIImage?’ to type ‘[UIImage]’ when generating a random image