How would I add line numbers to Core Text say in a view down the left hand side?
I’m not looking for exact details just how to know where each line starts and ends so I can deduce where to add the numbers in the separate view.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re laying out the text using
CTFramesetter, then you can callCTFrameGetLineOriginson your frame. Each origin represents the start of the baseline for that line. Keep in mind that Core Text uses the Quartz coordinate system, where Y increases from bottom to top.