I have an emblem that mine UIScrollViewdoes not scroll. I do not think this is a problem with the iphone emulator. Here is my way to build UIScrollView:
[scrollView setBackgroundColor:[UIColor blackColor]]
[scrollView setCanCancelContentTouches:NO]
scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
scrollView.clipsToBounds = YES; // default is NO, we want to restrict drawing within our scrollview
scrollView.scrollEnabled = YES;
and I add to it UILabel, to which later I add some information from xml.
labeL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 1000)];
labeL.numberOfLines = 0;
labeL.text =@"";
[scrollView addSubview:labeL]
this is how i add the value to UILabel:
vypisObratString = [[NSMutableString alloc] initWithString:labeL.text];
if (turnOver) {
turnOver = NO;
[vypisObratString appendString:@"----------------"];
[vypisObratString appendString:@"\n"];
labeL.text = vypisObratString;
}
But when I compile the program, it writes the corect values, but the last line looks like this:
12.1.2010...
and it does not scroll. What for? What am I missing?
source
share