   }
   
   func rangeOfTruncationToken()-> NSRange {
-    if (numberOfLines == 0) {
-      return NSMakeRange(NSNotFound, 0)
-    }
+    println("number of line = \(numberOfLines)")
+//    if (numberOfLines == 0) {
+//      return NSMakeRange(NSNotFound, 0)
+//    }
     if (attributedTruncationToken?.length > 0 && customTruncationEnabled == true) {
       var currentString:NSString = textStorage.string as NSString
       return currentString.rangeOfString(attributedTruncationToken!.string)

          if let attributes = descriptor.patternAttributes {
            textStorage.addAttributes(descriptor.patternAttributes!, range: truncationRange)
          }
        }        
      }
    }

  }

  }
  
  func rangeForTokenInsertion()-> NSRange {
    textContainer.size = self.bounds.size
    println("size = \(textContainer.size.width) x \(textContainer.size.height)")
    println("label size = \(self.frame.size.width) x \(self.frame.size.height)")
    println("length \(textStorage.length)")
    let glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(textStorage.length-1)
    println("glyph index = \(glyphIndex)")

    var range = layoutManager.truncatedGlyphRangeInLineFragmentForGlyphAtIndex(glyphIndex)
    println("range = \(range.location) x \(range.length)")
    if (range.length > 0 && customTruncationEnabled) {
      range.length += attributedTruncationToken!.length
      range.location -= attributedTruncationToken!.length
    }
