ios – Swift使用多种选项动画UIView

在动画UIView时,swift如何处理多个选项?我试过了
UIView.animateWithDuration(0.2,delay: 0.0,options: .Repeat | .Autoreverse,animations: {self.alpha = 0.0},completion: nil)

但似乎混淆了|用一个按位运算符:

Undefined symbols for architecture i386:
 "__TFSsoi1oUSs17_RawOptionSetType_USs21BitwiseOperationsTypeSs9Equatable__FTQ_Q__Q_",referenced from:
      __TFC17TextDrawing10cursorViewW8blinkingSb in cursorView.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我正在使用AppStore的最新Xcode版本.

解决方法

与Swift 2,现在是:
UIView.animateWithDuration(0.2,options: [.Repeat,.Autoreverse],completion: nil)

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...