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 7435343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:03:32+00:00 2026-05-29T10:03:32+00:00

I am trying allow users to copy and paste my text content that sits

  • 0

I am trying allow users to copy and paste my text content that sits in a UITextView. I have some title text, which is bold, followed by regular, unbolded text. Any way to set up a UITextView such that a single select-all copy/paste will work on both bold title and non-bold content text?

Currently, I am adding another UITextView and styling it as bold but this requires 2 select/select-all copy/paste operations:

txtView = [[UITextView alloc] initWithFrame:CGRectMake(0,60,280,300)];
[txtView setFont:[UIFont fontWithName:@"ArialMT" size:14]];




txtView.text = word.definition;


txtView.editable = NO;
txtView.scrollEnabled = YES;
[txtView scrollRangeToVisible:NSMakeRange([txtView.text length], 0)];
txtView.minimumZoomScale = 1;
txtView.maximumZoomScale = 10;

UITextView *wordTitle = [[UITextView alloc] initWithFrame:CGRectMake(0, 10, 320, 50)];

[wordTitle setFont:[UIFont boldSystemFontOfSize:14]];
wordTitle.text = word.term;
wordTitle.textAlignment = UITextAlignmentCenter;



[detailsViewController.view addSubview:wordTitle];
[detailsViewController.view addSubview:txtView];

[txtView release]; 
txtView = nil;

[htmlView release];
htmlView = nil;

[scrollView release];
scrollView = nil;


[[self navigationController] pushViewController:detailsViewController animated:YES];
[detailsViewController release];
  • 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-29T10:03:32+00:00Added an answer on May 29, 2026 at 10:03 am

    I solved this by using a UIWebView and passing in a HTML string like so:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
        //...more code here
    
        NSString *htmlDefinition = [word.definition stringByReplacingOccurrencesOfString:@"\n"
                                                                        withString:@"<br />"];
    
        NSString  *htmlString = [NSString stringWithFormat:@"<h2>%@</h2><p>%@</p>",[word term],htmlDefinition];
    
       [htmlView loadHTMLString:htmlString baseURL:nil];
    
       scrollView.contentSize = [htmlView bounds].size;
    
       [scrollView addSubview:htmlView];
    
       [detailsViewController.view addSubview:htmlView];
       [htmlView release];
       htmlView = nil;
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to allow users that have connected their Facebook accounts to my rails
I'm trying to create a basic system that will allow only specific users to
Im trying to allow users to login to a website by verifying if they
I'm working on a forums system. I'm trying to allow users to see the
I'm trying to craete a site which allows users to upload any file type
I'm trying to create a user control that allows users to make something like
I am trying to make a php login page that allows users to access
So I'm trying to add some ability to my project to allow user-defined properties
I am trying to set up a page that will allow the user to
I am trying to create something on a webpage that allows my users 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.