mardi 7 avril 2015

WatchKit Image Animation wait for finish

I currently looking for a wait to wait to finish my Image Animation and then start the next one after it is finished.


I thought to use a completion handler but it "does not work for me" is there a way to use it in that case?



if X > 1 {
self.GroupIMG.setBackgroundImageNamed("single")
self.GroupIMG.startAnimatingWithImagesInRange(NSRange(location: 0, length: 300), duration: Repeater, repeatCount: self.X)

}



//this should start after the if is done

self.GroupIMG.setBackgroundImageNamed("single")
self.GroupIMG.startAnimatingWithImagesInRange(NSRange(location: 0, length: leftX), duration: Repeater, repeatCount: 1)

Aucun commentaire:

Enregistrer un commentaire