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

  • SEARCH
  • Home
  • 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 4070214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:35:56+00:00 2026-05-20T16:35:56+00:00

I want to insert a UITextField in between the text of a UITextView to

  • 0

I want to insert a UITextField in between the text of a UITextView to provide “fill in the blanks” functionality. I know that UITextField can’t be added to the UITextView so I want to add UITextField to the super view of the UITextView by maintaining space for these UITextFields on the UITextView.

How can I determine the coordinates of a particular character with respect to the origin of the UITextView? The frame of the textView and its super view are the same. Can any one please tell me how to do this? Is there any other way to achieve fill in the blanks functionality with in a paragraph of text?

  • 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-05-20T16:35:57+00:00Added an answer on May 20, 2026 at 4:35 pm

    You may be able to use the UIStringDrawing additions to the NSString class to help find the location of characters.

    // characterIndex is the index of the character for which you are finding the position
    NSString *string = [myTextView.text substringToIndex:characterIndex];
    CGSize sizeOfString = [string sizeWithFont:myTextView.font constrainedToSize:myTextView.contentSize];
    

    If the character you are looking for is on the first line of the text view, sizeOfString will give you the coordinates (offset by the line height).

    If the character you are looking for is not on the first line, you would need to iteratively determine the location of each character up to the character you are looking for, modifying the substring to remove previous lines of text each time you detect the end of a line. You can detect the end of a line by noting when the sizeOfString‘s height has changed between iterations.

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

Sidebar

Related Questions

I want insert : between 2 dropdownlist in a cell. tableCell.Controls.Add(DropDownListOraInizio); tableCell.Controls.Add(DropDownListMinutoInizio); How can
I want to insert a separator between blocks and content, that are rounded with
I want to insert 4 blanks in a text named test. sed 's/^/ \{4\}/'
I want to insert given text to existing pdf at X,Y location provided. I
i want to insert all processes that running into listbox, and also how to
How i can insert in database from textarea field that each line is a
I want to insert this XML data into SQL Server 2008 <rewriteMap name=OldStaticUrl> <add
I have vector with 6 numbers, which I want insert to list and add
I want to insert a multiline text data in a CSV field. Ex: var
I want to insert data to database. I have a table, named member that

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.