swift - Cannot assign a value of type '[UIImage?]' to a value of type '[AnyObject]?' -


this code please help, i'm following tutorial can't figure out whats wrong. please help.

i'm trying create slideshow in swift

    var logoimages: [uiimage] = []     logoimages.append(uiimage(named: "logo.png")!)      imageview.animationimages = [         uiimage(named: "jade2.jpg"),         uiimage(named: "jade1.jpg"),         uiimage(named: "jade14.png")     ]       imageview.animationduration = 5      imageview.startanimating() 

i thankful help.

your images optional in animationimages add ! after every images , work fine.

and code be:

imageview.animationimages = [uiimage(named: "jade2.jpg")!,         uiimage(named: "jade1.jpg")!,         uiimage(named: "jade14.png")!     ] 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -