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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:01:17+00:00 2026-05-26T01:01:17+00:00

I have the following problem: I have a standard UITextView which I resize once

  • 0

I have the following problem: I have a standard UITextView which I resize once the keyboard pops up. I also have another view which I animate into view (not the standard accessory view attached to the keyboard). The problem is that I do not want text to be hidden by this view. This is what happens when I reach the last line (orange view = my custom accessory view):

enter image description here

Ideally, I’d like to have an automatic scroll should that happen. But I have no clue how to achieve this if I am in the last line of the UITextView. Also, scrollToVisible doesn’t work in this context and I don’t know if I’d get anywhere with contentInset.

Any suggestions would be welcome! Thanks.

EDIT

I suppose I would need some kind of mechanism which would allow to

  1. make the textview only expand to the line right above the accessory view if I was entering something on the LAST LINE
  2. have the textview expand to the keyboard if I was not editing the LINE DIRECTLY ABOVE the KEYBOARD.

Does that make sense? What I need is the opposite of contentInset, I suppose.

I simply don’t want to resize the textView to just above the accessory view as it takes away screen space to display 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-26T01:01:18+00:00Added an answer on May 26, 2026 at 1:01 am

    I got the solution- sorry, I guess it was obvious, but it took me the whole day to figure it out:

    textOfPage.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
    

    This will offset my UITextView so that the last line is never hidden. The 100 is in pixels and can be adjusted accordingly.

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

Sidebar

Related Questions

I have the following problem that the standard library doesn't solve well, and I'm
I have the following problem: I open the dialog, open the SIP keyboard to
I have the following problem. If I query values with a keyfigure which is
I am stuck with following monad problem: Let's say I have a standard monad
I have the following problem: I have a Wintec WBT-202 GPS device which has
I have the following problem (I think it's well known/standard) that I am thinking
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
I have the following problem: I have an HTML textbox ( <input type=text> )
I have the following problem using subversion: I'm currently working on the trunk of

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.