3
我有porblem,我的UIScrollView
不滾動我不認爲這是iphone模擬器的問題。這是我的方式來構建UIScrollView
:使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;
,我添加UILabel
到它,後來我加從XML一些信息。
labeL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 1000)];
labeL.numberOfLines = 0;
labeL.text [email protected]"";
[scrollView addSubview:labeL];
我這是怎麼增值UILabel
:
vypisObratString = [[NSMutableString alloc] initWithString:labeL.text];
if (turnOver) {
turnOver = NO;
[vypisObratString appendString:@"----------------"];
[vypisObratString appendString:@"\n"];
labeL.text = vypisObratString;
}
但是,當我編譯程序寫入的corect值,但最後一行是這樣的:
12.1.2010...
和它不滾動。爲什麼?我錯過了什麼?
感謝它開始scroll.Your的答案是正確的,但現在它不會滾動我所有的UILabel這是CGRectMake(0,0,320,1000)都有它CGSizeMake東西(600,400)? – Csabi 2011-01-14 09:28:01