Note that there are some explanatory texts on larger screens.

plurals
  1. POScrollView setContentSize not making the scrollView larger
    primarykey
    data
    text
    <p>I currently have a <code>-UIScrollView</code> and I have a function that adds more information inside the scrollView, however inside the function it recalculates the size of the scrollView and I try to make it bigger but it stays the same.</p> <p>Basically inside <code>-viewDidLoad</code> it sets the "Default" size of the <code>-UIScrollView</code></p> <pre><code>[self.xboxScrollView setContentSize:CGSizeMake(303, 2890)]; </code></pre> <p>After some time the device adds a few other values to the <code>-UIScrollView</code></p> <pre><code>- (void)addAnotherCheat:(NSString *)title :(NSString *)description index:(NSInteger)cheatID { int titleLocation = 2744 + (cheatID * 101); int titleDescription = 2766 + (cheatID * 101); float lengthofscrollViews = 2866 + (cheatID * 101); cheat1 = [[UILabel alloc] initWithFrame:CGRectMake(13, titleLocation, 287, 35)]; description1 = [[UILabel alloc] initWithFrame:CGRectMake(13, titleDescription, 287, 71)]; image1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, titleLocation, 306, 91)]; UIImage *image = [UIImage imageNamed: @"backggroundcolor.png"]; [self.xboxScrollView setContentSize:CGSizeMake(303, lengthofscrollViews)]; [self.xboxScrollView setScrollEnabled:YES]; NSLog(@"Scrollview Size : %f", self.xboxScrollView.contentSize.height); [self.xboxScrollView addSubview:image1]; [self.xboxScrollView addSubview:cheat1]; [self.xboxScrollView addSubview:description1]; image1.image = image; cheat1.backgroundColor=[UIColor clearColor]; cheat1.textColor = [UIColor whiteColor]; description1.backgroundColor=[UIColor clearColor]; description1.textColor = [UIColor whiteColor]; description1.numberOfLines = 3; [cheat1 setFont:[UIFont fontWithName:@"STHeitiTC-Medium" size:19.0f]]; [description1 setFont:[UIFont fontWithName:@"STHeitiTC-Light" size:16.0f]]; cheat1.text = title; description1.text = description; } </code></pre> <p>When I Log the size that it's supposed to be it prints out the correct height I want, however it doesn't change the height.</p> <p>Basically I need a method to make the scrollView larger when I've already set the ContentSize.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload