草庐IT

CTLineGetTypographicBounds

全部标签

ios - CTLineGetTypographicBounds 的问题

代码摘自SimpleTextInputsampecode,稍作修改。创建框架:self.font=[UIFontsystemFontOfSize:18.f];CTFontRefctFont=CTFontCreateWithName((CFStringRef)self.font.fontName,self.font.pointSize,NULL);self.attributes=[[NSDictionarydictionaryWithObject:(id)ctFontforKey:(NSString*)kCTFontAttributeName]retain];NSAttributedSt