好奇心问题: 我只是想知道以下是否存在真正的不同:
let champNameLabel: UILabel!
champNameLabel = UILabel(frame: CGRectMake( 0, 0, cellSize(champsPerRow), textHeight))
champNameLabel.center = CGPointMake(textCenterX, textCenterY)
champNameLabel.textAlignment = .Center
champNameLabel.textColor = UIColor.whiteColor()
champNameLabel.font = champNameLabel.font.fontWithSize(fontSize)
contentView.addSubview(champNameLabel)
和
let champNameLabel = UILabel()
champNameLabel.frame = CGRectMake( 0, 0, cellSize(champsPerRow), textHeight)
champNameLabel.center = CGPointMake(textCenterX, textCenterY)
champNameLabel.textAlignment = .Center
champNameLabel.textColor = UIColor.whiteColor()
champNameLabel.font = champNameLabel.font.fontWithSize(fontSize)
contentView.addSubview(champNameLabel)
我已经在教程中看到了网络的两种方式,并想知道一种方式是否更好。感谢您提前提供任何帮助。