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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:58:45+00:00 2026-06-13T19:58:45+00:00

I have had this problem for a long time now, I hope stackoverflow can

  • 0

I have had this problem for a long time now, I hope stackoverflow can help!

THE PROBLEM IS

When I enter “Alan Shearer” into the EnterNameText (UI TEXTFIELD) the label changes text, however the ScrollView no longer scrolls to the set content size, it will scroll a little bit, but no were near the set content size, in this case 2000px in height.

details

1) Xcode 4.5.1

2) IOS 6

In my .xib file ( tinypic.com/view.php?pic=2h4yx3o&s=6 ) I have a UIScrollView (320 pixels in width, and 490 pixels in height)
The UIScrollView contains labels that are all connected to view controller.h.

The Label (all labels are set in the same way) :

  @property (strong, nonatomic) IBOutlet UILabel *AlanShearerLabel;

my UIScrollView in ViewController.h looks like this:

 @property (strong, nonatomic) IBOutlet UIScrollView *scrollview;

UIScrollView in ViewController.m

 - (void)viewDidAppear:(BOOL)animated{[super viewDidAppear:animated]; self.scrollview.contentSize=CGSizeMake(320.0, 2000.0);  }

An IBAction called – (IBAction)CheckButton:(id)sender

The action when CheckButton is clicked:

//string 0

NSString *string0 = _EnterNameText.text;

//Alan Shearer

NSString *string1 =@"Alan Shearer";
NSString *string2 =@"Rank 1) Alan Shearer 260 Goals";
NSString *stringshearer =@"Shearer";

//Alan Shearer IF

if([string0 isEqualToString:string1]||
   [string0 isEqualToString:stringshearer])
{_AlanShearerLabel.text = string2;
    _AlanShearerLabel.textColor = [UIColor greenColor];
    _EnterNameText.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-06-13T19:58:47+00:00Added an answer on June 13, 2026 at 7:58 pm

    To solve this issue you must be sure to define all the things inside the scrollview before you link the scrollview to the .h file. For example if you have 20 labels in a scrollview, be sure that the 20 labels have been connected to the .h file, set the right size, put in the right place. Only then do you connect your scrollview to the .h file and place the scrollview code in viewDidAppear rather then viewdidload.

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

Sidebar

Related Questions

Has anyone had this problem? My projects tend to have some long XML files
I have had this problem crop up a few times and I can't figure
This is a problem I've had on my mind for a long time. Being
I have had a long problem with this code. I have posted this question
I had this problem a couple of months before and now it is time
I have had this problem w/ two seperate WYSWYG editors in my rails application
I'm very confused and am hoping someone might have had this problem and be
Ok I have this problem that I've never had before, it's really bugging me.
I have a problem with this script. At first I had the <div> s
(I have a problem that I illustrated in this question but had no correct

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.