Swift Infinite Fade in and Out Loop
问题 How can I make a effect in swift similar to this: I want the animation to loop forever. 回答1: For iOS UIViewAnimationOptions set provides different handy options to achieve a combination of beautiful and complex animations. For your particular scenario you will require two of the options. UIViewAnimationOptions.Repeat UIViewAnimationOptions.AutoReverse Check out the code below for implementation. Code : class MyViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad(