Explorar el Código

avoid forced unwrapping

cyberta hace 5 años
padre
commit
927e69e72c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      deltachat-ios/View/MultilineTextFieldCell.swift

+ 1 - 1
deltachat-ios/View/MultilineTextFieldCell.swift

@@ -64,7 +64,7 @@ class MultilineTextFieldCell: UITableViewCell, UITextViewDelegate {
 
         textField.alignLeadingToAnchor(margins.leadingAnchor, paddingLeading: -5)
         textField.alignTrailingToAnchor(margins.trailingAnchor)
-        let fontsize = textField.font!.pointSize
+        let fontsize = UIFont.preferredFont(forTextStyle: .body).pointSize
         contentView.addConstraint(textField.constraintHeightTo(fontsize * 4))
         textField.alignTopToAnchor(descriptionField.bottomAnchor)