gpt4 book ai didi

ios - Swift 预期声明错误?

转载 作者:行者123 更新时间:2023-11-30 12:01:52 27 4
gpt4 key购买 nike

import UIKit

class ImageAnimation: UIViewController {


@IBOutlet weak var IMGs: UIImageView!


override func viewDidLoad() {
super.viewDidLoad()
IMGs.animationImages = [#imageLiteral(resourceName: "IMG1.jpg"),#imageLiteral(resourceName: "IMG2.jpg"),#imageLiteral(resourceName: "IMG3.jpg"),#imageLiteral(resourceName: "IMG4.jpg")]
IMGs.animationDuration = 1.0
IMGs.animationRepeatCount = 25
IMGs.startAnimating()

}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

我在“override func viewDidLoad() {”处得到预期声明(错误)如何解决这个问题

最佳答案

尝试清理项目并再次编译。为此,请按 ⌘ + Shift + K

来自命令行的rm -rf ~/Library/Developer/Xcode/DerivedData

关于ios - Swift 预期声明错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47121406/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com