所以我浏览了苹果网站上的开发者库,我找不到任何文档说明如何使用swift语言来说明用于UIImage的文件(如png).所以我尝试使用这段代码:
class ViewController: UIViewController {
@IBOutlet var maintitle: UIImageView
var bigtitle: UIImage!
var smalltitle: UIImage!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
func startAnimating(){
var animatedtitle: AnyObject[] = [bigtitle, smalltitle]
var animationDuration: NSTimeInterval = 0.15
var animationRepeatCount: Int = 0
}
}
Run Code Online (Sandbox Code Playgroud)
我试图在那里做的是动画一个永无止境的两个图像系列.我定义了两个UIImages(bigtitle和小标题),并想知道如何定义用于那些UIImage的wat .png.我知道这是一个非常基本和新手的问题,但任何帮助都会被享受.