Top "Core-text" questions

Core Text is the modern text layout and rendering framework on Apple's Mac OS X and iOS operating systems.

Can I use NSAttributedString in Core Text in iOS?

I'm trying to work out how to take an NSAttributedString and use it in Core Text on the iPad. I …

iphone objective-c ipad core-text
Drawing Text with Core Graphics

I need to draw centered text to a CGContext. I started with a Cocoa approach. I created a NSCell with …

cocoa core-graphics core-text
How to get text / String from nth line of UILabel?

Is there an easy way to get (or simply display) the text from a given line in a UILabel? My …

ios swift uilabel core-text
How does line spacing work in Core Text? (and why is it different from NSLayoutManager?)

I'm trying to draw text using Core Text functions, with a line spacing that's as close as possible to what …

objective-c macos nstextview core-text nslayoutmanager
(NSCFType set) - Unrecognized selector in iOS 6

I'm using the great TTTAttributedLabel (https://github.com/mattt/TTTAttributedLabel) which works fine under iOS 5. Under iOS 6 however, I get …

ios xcode ios6 core-text ctfontref
How to add label or text in to CAShapeLayer

Here is my class and it'll draw a circle, it looks like this: class OvalLayer: CAShapeLayer { let animationDuration: CFTimeInterval = 0.3 override …

ios swift calayer core-text cashapelayer
CGContextSelectFont equivalent

In iOS7 CGContextSelectFont is deprecated. Deprecation message says that I have to use Core Text, but I don't know which …

iphone objective-c ios7 core-text
iOS 5/6 vs iOS 7 multiline label line spacing

I ran my app under iOS 7 and discovered that multiline labels (non-attributed, plain text) render with a small line spacing. …

ios uilabel ios7 core-text textkit
Core Text's CTFramesetterSuggestFrameSizeWithConstraints() returns incorrect size every time

According to the docs, CTFramesetterSuggestFrameSizeWithConstraints () "determines the frame size needed for a string range". Unfortunately the size returned by this …

cocoa cocoa-touch core-text
CoreText and strikethrough on iPhone

I'm currently struggling with the need to display strikethrough text in many UITableViewCells. Something that written in HTML would looke …

iphone ios nsattributedstring strikethrough core-text