我使用脚本segue在整个应用程序中导航。我为segue identifiertable cell identifier声明字符串变量。所以我不会在视图控制器类中进行任何输入错误。

import UIKit

private let showTripViewSegueIdentifier = "showTripView"
private let contactCellIdentifier = "contactCell"

class JobViewController: UIViewController , UITableViewDataSource,UITableViewDelegate{
}

它会影响应用程序的内存使用吗?(因为整个应用程序会有很多视图控制器)。这是个好办法吗?
提前谢谢。

最佳答案

这不会有太大的区别。无论如何,字符串必须存储在某个地方,因为您在运行时使用它们。

10-05 21:08
查看更多