通过thisquestion我了解到,为了通过NSTextAlignmentCenter在UILabel中居中对齐文本,我必须禁用“字母收紧间距”和thisguyagrees.他们提到在界面生成器中禁用此选项,但是,据我所知,我的uilabel在IB中无法访问。这是因为我试图更改uitableview中单元格的“textLabel”。我继续尝试禁用代码中的内容:cell.textLabel.numberOfLines=1;cell.textLabel.adjustsFontSizeToFitWidth=NO;cell.textLabel.adjustsLetterSpacingToFi