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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:56:05+00:00 2026-06-11T22:56:05+00:00

I have developped a litle function to insert text in UITextView and scroll down

  • 0

I have developped a litle function to insert text in UITextView and scroll down automatically. It works fine with iOS 5 but since i have updated Xcode to Xcode 4.5 with iOS6, this method no longer works.

Could you help me ?

Here is this method :

- (void) insertTextInAPP : (UITextView*) tv : (NSString*) s {
     NSRange range = {[tv.text length], 0};
     [tv setSelectedRange:range];
     [tv insertText:s];
     [tv insertText:@"\n"];
     range.location = [tv.text length];
     [tv scrollRangeToVisible:range];
}

And i use this function like this :

NSString *newEventString = [[NSString alloc] initWithFormat : @"Test"];
[self insertTextInAPP:self.outPutTextView: newEventString];
  • 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-11T22:56:06+00:00Added an answer on June 11, 2026 at 10:56 pm

    It works just fine here (iOS 6, Xcode 5.5). Of course, I needed to change (UITextView) tv to (UITextView*) tv and "Test" to @"Test", but other than that it was alright.

    What happens when you try it?

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

Sidebar

Related Questions

I have a jax-ws web service developped using netbeans 7 and glassfish 3.1.2 .
I developped a package to extend Visual Studio. As part of it, I have
I have developped an iPhone app and I now need it to work on
I have a scalar function in my code that calls another scalar function that
Im using this code: $(document).ready(function () { var breadCrumps = $('.breadcrumb'); breadCrumps.find('span').text(<%= ArticleSectionData.title %>);
I have developed a MonoTouch iPhone application. Currently it works by parsing a large
I have a simple contact form that works in every browser, except IE. It
I have developed several GWT Web Applications. Latest one is a little modification of
I'm a little confused. We have developed an net 4.0 application. We use nhibernate
I have inherited a few programs from a previous developer who was a little

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.