3
내 UIScrollView
이 스크롤되지 않는 porblem이 있습니다. 아이폰 에뮬레이터에 문제가 있다고 생각하지 않습니다. 여기 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에서 일부 정보를 추가 할 수 있습니다.
vypisObratString = [[NSMutableString alloc] initWithString:labeL.text];
if (turnOver) {
turnOver = NO;
[vypisObratString appendString:@"----------------"];
[vypisObratString appendString:@"\n"];
labeL.text = vypisObratString;
}
하지만이 프로그램을 컴파일 할 때 그것은 corect 값을 기록하지만 마지막 줄은 다음과 같이이다 :
labeL = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 1000)];
labeL.numberOfLines = 0;
labeL.text [email protected]"";
[scrollView addSubview:labeL];
이 내가 UILabel
에 가치를 추가하는 방법입니다
12.1.2010...
및 스크롤하지 않습니다. 왜? 내가 뭘 놓친거야?
그것을 CGSizeMake 뭔가를 가지고 scroll.Your의 대답은 옳았다로 시작했지만 지금은 (1000 0, 0, 320) CGRectMake 내 UILabel의 모든 스크롤되지 않습니다 감사 (600,400)? – Csabi
예 - 죄송합니다 위의 코드를 업데이트했습니다. 스크롤 할 수있는 영역의 크기에 맞게 CGSizeMake 매개 변수를 설정해야합니다. –
감사합니다. – Csabi