迅速预期的声明错误?

时间:2017-11-05 12:12:22

标签: ios swift xcode swift4

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.
    }
}

我在"得到预期声明(错误)覆盖func viewDidLoad(){" 如何解决这个问题

1 个答案:

答案 0 :(得分:0)

尝试清理项目并再次编译。为此,请点击⌘ + Shift + K
 或
rm -rf ~/Library/Developer/Xcode/DerivedData从命令行开始。