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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:06:01+00:00 2026-06-12T23:06:01+00:00

I have added a view in IB. I have a label in this view,

  • 0

I have added a view in IB. I have a label in this view, its height will vary at run time based on text it is holding, Now my question is when the label size is varying it is going beyond the height of UIView, So I want to add a scroll view in this view to view full label. I have added scroll view like this…

        CGRect scrollViewFrame = CGRectMake(0, 0, 320, 460);
        UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
        CGSize scrollViewContentSize = CGSizeMake(self.view.frame.size.width, 
                                                  (self.view.frame.size.height + 1000));
        [scrollView setContentSize:scrollViewContentSize];
        [self.view addSubview:scrollView];

After this scroll view is added in my view, however my view is not moving down when I scroll down. Am I doing anything wrong here…

thanks for your helps..

  • 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-12T23:06:02+00:00Added an answer on June 12, 2026 at 11:06 pm

    try like this code..
    first take UIView and add UILable in this your new view alike a bellow code .. like a flow..

        CGRect scrollViewFrame = CGRectMake(0, 0, 320, 460);
        UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
        CGSize scrollViewContentSize = CGSizeMake(self.view.frame.size.width, 
                                                  (self.view.frame.size.height + 1000));
        [yourView addSubview:yourLable];
        [scrollView addSubview:yourView];
        [scrollView setContentSize:scrollViewContentSize];
        [self.view addSubview:scrollView];
    

    i hope this help you…

    🙂

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

Sidebar

Related Questions

I have added a UILabel to my view programmatically like this: myLabel = [[UILabel
I have just added a Core Plot view to my application based on a
I have added one view controller to my first view controller as aa subview
I am using UIImagePickerController for my camera and have added an Overlay View Controller
I am building an app using storyboard. I have added a table view to
I have added the COleDropTarget variable to my view class and registered it in
I have an activity view that I have added in AppDelegate class to tap
I have a main view to which I have added a subview using the
In my custom View which I have added to my viewControllers's view, I need
I am using a storyboard and I have added iAd banner to my view.

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.