많은 조합을 시도했지만 Xcode 6/Swift에서 글꼴 크기를 줄일 수 없습니다. 나는 기본적으로 테이블 셀에 6 개의 라인 항목을 가지고 있지만, 3 (나는 그것이 더 많은 것을 잠재적으로 스크롤하지 않거나 스크롤하지 않기를 희망하면서 글꼴을 더 작게하고 싶다.)에 적합하다.UITableCell 글꼴 크기 (스위프트에서)
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell
cell.textLabel.adjustsFontSizeToFitWidth = true
cell.textLabel.minimumScaleFactor = 0.1
cell.textLabel.minimumFontSize = 10.0
cell.textLabel.font = UIFont.systemFontOfSize(10.0)
cell.textLabel.text = String(reportData[indexPath.row] as NSString)
return cell
}
내가 그것을 위 매 일 (스케일 팩터, 글꼴 크기, 새로운 글꼴, 등, 등, 등을 설정하는 가장 좋은 방법이 아니다 알고 있어요하지만, 난 그냥 원 : 여기
내 코드입니다 나는 모든 것을 시도했다는 것을 보여주기 위해).위의 일부가 작동하지 않는 버그 또는 문제점에 대해 알고 계십니까? 각 셀의 글꼴 크기를 설정하는 적절한 방법은 무엇입니까?
감사합니다.