解决方法
在“cellForRowAt indexPath”委托方法中,更改textLabel的字体样式.
- func tableView(_ tableView: UITableView,cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cell = tableView.dequeueReusableCell(withIdentifier: "cell")
- cell?.textLabel?.font = UIFont(name: "HelveticaNeue-Medium",size: 16.0)!
- //your code//
- return cell
- }
然后将使用给定的字体类型覆盖动态类型.