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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:14:53+00:00 2026-06-08T21:14:53+00:00

I had a text view and i was taking chat that came in from

  • 0

I had a text view and i was taking chat that came in from the internet and was printing it but i wanted more colors than a textview had to format the chat.

I replaced the textview with a scrollview and in viewdidload i attempted ( seemed to work) to attach my view class to it.

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    _myconsoleview = [[ConsoleView alloc] initWithFrame:[self._scview bounds]];
    [_myconsoleview setBackgroundColor: [UIColor yellowColor]];
    [self._scview addSubview:_myconsoleview];
    [self._scview setNeedsDisplay];
}

well as text got to the bottom it didn’t scroll ( i tried dragging the text are with the mouse and looked for scroll bars).

so this example core text program says oh thats easy to get scrolling. just make my custom view (ConsoleView) inherit the scroll view itself. So i try this and add this now:

@interface ConsoleView :UIScrollView<UIScrollViewDelegate>

still no scrolling. no scroll bars. no indication and i’m using the ipad simulator so far, of any kind of scrolling. In ConsoleView i want to do something very polished eventually but for now i’m just printing a single string. But the string gets longer as i get more text as i’m appending to it.

i tried this in my sendtext method. this hits when they hit a button to send the text they type in this textfield to the server:

   [myconsoleviewid addNewText:newText];
    [_scview scrollRectToVisible:[_scview bounds] animated: TRUE];
    [_scview setNeedsDisplay];

I honestly am not sure i can claim the above would work but i figured something might work. any ideas? I’m fairly new to ios programming having started about 2 months ago and worked on it off and on so far. In java or android there doesn’t seem to be much more to getting like a console to scroll than to add it to some scroll control. But IOS is proving trickier.

Mike

edit. this is my draw rectangle which is suppose to print the string which gets longer and longer. its in consoleview:

- (void)drawRect:(CGRect)rect
{
    [super drawRect:rect];
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetTextMatrix(context, CGAffineTransformIdentity);
    CGContextTranslateCTM(context, 0, self.bounds.size.height);
    CGContextScaleCTM(context, 1.0, -1.0);    CGMutablePathRef path = CGPathCreateMutable(); //1
    CGPathAddRect(path, NULL, self.bounds );


    CTFramesetterRef framesetter =
    CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)attString); //3
    CTFrameRef frame =
    CTFramesetterCreateFrame(framesetter,
                             CFRangeMake(0, [attString length]), path, NULL);

    CTFrameDraw(frame, context); //4

    CFRelease(frame); //5
    CFRelease(path);
    CFRelease(framesetter);
}
  • 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-08T21:14:54+00:00Added an answer on June 8, 2026 at 9:14 pm

    The ScrollView’s contentSize must be larger than the ScrollView’s frame in order to allow scrolling. Set this property correctly and you should be fine.

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

Sidebar

Related Questions

I have a text file that is formatted like JSON, but in a print/view
I inherited an Intraweb app that had a 2MB text file of memory leaks
i had questioned here : Best idea for importing text to each NavigationController View
I have a onListItemClick that returns the text from item in the listview with:
I thought I had this all figured out, but now that I'm writing a
Actually i want to change the text color of the listview that i had
I know that questions about XML had been answered million times here but i
I had a grid view populated from dataset and I have to redirect another
I'd like to view text/html attachments inline with auto_view. That's easy enough, with a
I'm trying to get a user input from Edit Text into List View, I

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.