Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8346423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:00:35+00:00 2026-06-09T07:00:35+00:00

I have some CTFrame columns of text placed on a UIScrollView and I made

  • 0

I have some CTFrame columns of text placed on a UIScrollView and I made a selection tool to be able to select and highlight the text, as shown on image bellow.

I’d like to be able to click the selection, so the rectangles are UIButtons with 50% opacity, over the CTFrame.

The problem is the following: By some reason, the buttons TouchUpInside event isn’t triggered and I think that if the highlight were placed bellow CTFrame, it would have a better effect, but I think the button wouldn’t receive the event.

Any ideas to solve the problem, ie., to have a selection mark bellow text and clickable?


Here’s the Text highlight example:

Text selection over CTFrame

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:00:37+00:00Added an answer on June 9, 2026 at 7:00 am

    How did you placed you CTFrames to UIScrollView ? CTFrame is not a UIView subclass. Where do you draw it?
    Also check your UIScroll view’a content size.

    Using UIButtons is not a good idea, It’s better to draw it directly with Core Graphics.
    Touch should be handled bu UIView itself and then translated to appropriate text.
    Use CTFrameGetLineOrigins() to find the correct line (by checking the Y origins), and then using CTLineGetStringIndexForPosition() to find the correct character within the line (after subtracting the line origin from point).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a certain amount of text that fill some CTFrame (more than one).
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
Have some data in a sybase image type column that I want to use
I have some code that can convert a single color in a template image
I have some image data (jpeg) I want to send from my iPhone app
Have some text that needs to be replaced, searched around this website for all
Have some delimited files with improperly placed newline characters in the middle of fields
I have some text in a field that I need to replace, but the
Have some text files that I need to break out the individual words. But
I have some data loaded as a np.ndarray and need to convert it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.