1

当我写下这些代码片段时:

import UIKit

class HomeViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {

    var homeCellArr: [Dictionary <String, String>] = [
        ["name": "eee", "pic": "newsIcon"],
        ["name": "dcd", "pic": "taskIcon"],
        ["name": "ccccc", "pic": "cardIcon"],
        ["name": "bbbb", "pic": "mailIcon"],
        ["name": "aa", "pic": "optionIcon"]
    ]
    override func viewDidLoad() {
        ......

我发现构建和索引变得太慢了

在这个 Swift 文件中,代码自动完成也变得慢了

比如我写self。 我必须等待 6 秒或 7 秒,才能显示自动完成功能

如何解决这个问题?


当我注意到这些代码时

 //       var homeCellArr: [Dictionary <String, String>] = [
 //           ["name": "eee", "pic": "newsIcon"],
 //           ["name": "dcd", "pic": "taskIcon"],
 //           ["name": "ccccc", "pic": "cardIcon"],
 //           ["name": "bbbb", "pic": "mailIcon"],
 //           ["name": "aa", "pic": "optionIcon"]
 //       ]

代码自动补全速度正常

4

0 回答 0