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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:28:06+00:00 2026-05-12T17:28:06+00:00

This seems like it should be simple but I can’t work out how to

  • 0

This seems like it should be simple but I can’t work out how to do it.

I’ve created a UITextView in interface builder. It doesn’t sit in a table cell or anything fancy like that.

What I’d like to do is have the UITextView scroll itself to the left when the user has typed their way all the way to the right margin.

At the moment it just does a word wrap, I understand the word wrap makes sense in most situations but I need it to scroll instead. What I’m after is the same behavior it exhibits vertically.

I’ve tried adjusting the content size of the UITextView in viewDidLoad and also in viewDidAppear and that doesn’t make a difference.

I’ve also played with the inset settings in IB but that doesn’t affect the scrollable size, just WHERE it’s displayed.

Does anyone have any ideas?

  • 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-12T17:28:06+00:00Added an answer on May 12, 2026 at 5:28 pm

    Ok, it doesn’t look like it can be done exactly how I wanted but I’ve come up with a hack to get me there.

    Let’s say I want a scrollable width of 600 and a visible width of 250.

    The first step is to make the UITextView a wide as the area you want to be scrollable. So what you would have put into contentSize, in this case 600.

    Then the right inset is set to the difference between the actual width and the width you wanted. In this case 350.

    This way cursor is restrained to the width you need BUT there is text visible to the right of your desired width, after all, the UITextView IS 600 pixels wide.

    Now here’s where the really hackish bit comes in, don’t read on if you’re sensitive or have a weak stomach.

    Get an image of the user interface to the right where UITextView should end. Insert it into the NIB as an UIImage view and put it back in it’s place, making sure that it’s on top of the UITextView.

    When the view is displayed, the cutout sits on top of the UITextView and hides the text overrun.

    I’m not proud, but it works.

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

Sidebar

Related Questions

This seems like it should be simple, but I can't figure it out. I'm
First check out this code. I seems like it should work for me, but
This seems like it should be simple but I can't find anything yet. In
This seems like it should have a simple solution but I can't seem to
This seems like it should be really simple to do but I just can't
This seems like something simple but I can't seem to get it to work.
This seems like a simple question, but I can't find it with the Stack
This seems like it should be simple but it's driving me up the wall.
This seems like it should be an easy one but I can't figure it
This seems like it should be simple, but I haven't been able to figure

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.