프로그래밍 방식으로 UITableView를 만들었고 스크롤하지 않는다는 것을 알았습니다. 인터페이스 작성기를 사용하지 않고 프로그래밍 방식으로 UITableView를 만든 것은 이번이 처음입니다. 내보기를 스크롤 할 수 있도록 프로그래밍 방식으로 설정해야하는 속성이 있습니까? setBounces, setScrollEnabled, setAlwaysBounceVertical 시도했지만 아무 것도 작동하는 것. 어떤 아이디어라도 대단히 감사하겠습니다! 감사!UITableView 스크롤하지 않음 (iOS)
샘플 코드 다음의 TableView에
UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];
CGFloat height = (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) ? 460 : 300;
feed = [[UITableView alloc] initWithFrame:CGRectMake(0.0f, 44.0f, self.bounds.size.width, height - 44.0f)];
[feed setSeparatorColor:[UIColor colorWithRed:38.0f/255.0f green:43.0f/255.0f blue:63.0f/255.0f alpha:1.0f]];
[feed setBackgroundColor:[UIColor colorWithRed:48.0f/255.0f green:53.0f/255.0f blue:73.0f/255.0f alpha:1.0f]];
[feed setDataSource:self];
[feed setDelegate:self];
[feed setHidden:YES];
[feed setBounces:YES];
[feed setScrollEnabled:YES];
[feed setAlwaysBounceVertical:YES];
[feed setDelaysContentTouches:YES];
[self addSubview:feed];
코드 샘플을 게시 할 수 있습니까? – Matt
코드 예제를 추가했습니다 ... – user1118042
실제로 스크롤해야하는 UITableView에 충분한 콘텐츠가 있습니까? –