OSDN Git Service

今は使わない機能を削除 
authormasakih <masakih@users.sourceforge.jp>
Tue, 19 Sep 2017 13:16:58 +0000 (22:16 +0900)
committermasakih <masakih@users.sourceforge.jp>
Tue, 19 Sep 2017 13:16:58 +0000 (22:16 +0900)
KCD/NSTextFieldExtension.swift

index e0b9b33..dba75dd 100644 (file)
@@ -43,7 +43,7 @@ extension NSTextField {
         return r
     }
     
-    func isCharacterProtrude(kern: CGFloat = 0) -> Bool {
+    func isCharacterProtrude() -> Bool {
         
         guard let currentFont = font else {
             
@@ -53,7 +53,7 @@ extension NSTextField {
         }
         
         let string = stringValue as NSString
-        let size = string.size(withAttributes: [NSFontAttributeName: currentFont, NSKernAttributeName: kern])
+        let size = string.size(withAttributes: [NSFontAttributeName: currentFont])
         
         return bounds.size.width - size.width < 3
     }