dimanche 3 juillet 2016

My FadeIn and FadeOut code is not working


my question seems to have been answered but I can't seem to make their code work. So I came up with my own code. The problem is, my code does't work either! I'm trying to make my UIImageView fade in and fade out between images. Here is my code for this: override func viewDidLoad() { super.viewDidLoad() self.FrontPageIMView.alpha = 0 while self.viewIfLoaded == true && self.view.window == true { FadeIn(image: FrontPageIMView) self.FrontPageIMView.image = Image1 FadeOut(image: FrontPageIMView) self.FrontPageIMView.image = Image2 FadeIn(image: FrontPageIMView) SKAction.wait(forDuration: 2.0) FadeOut(image: FrontPageIMView) self.FrontPageIMView.image = Image3 FadeIn(image: FrontPageIMView) SKAction.wait(forDuration: 2.0) FadeOut(image: FrontPageIMView) self.FrontPageIMView.image = Image4 FadeIn(image: FrontPageIMView) SKAction.wait(forDuration: 2.0) FadeOut(image: FrontPageIMView) } } Please Ignore the while loop. I know there is something wrong with it. Im trying to make this code only run when the user is on this view only. Though if you guys could fix this, that would be awesome! Thanks, WILL_CODER4

Aucun commentaire:

Enregistrer un commentaire