방금 추가 단추를 내 tableView의 바닥 글에 구현했지만 바닥 글이 항상 테이블로 스크롤됩니다. 내 tableView의 스타일은 UITableViewStylePlain입니다.TableView 바닥 글이 테이블로 스크롤됩니다
어디에서 잘못 될지 알려주실 수 있습니까? 테이블에 대한 바닥 글을 정의하지 않습니다 우선
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView *footerView = nil;
if(footerView == nil) {
footerView = [[[UIView alloc] init] autorelease];
footerView.backgroundColor = [UIColor clearColor];
UIButton *button = [[UIButton alloc] init];
button.layer.cornerRadius = 7;
[button setFrame:CGRectMake(10, 3, 300, 44)];
[button setTitle:@"Load 20 more" forState:UIControlStateNormal];
[button.titleLabel setFont:[UIFont boldSystemFontOfSize:20]];
[button setBackgroundColor:[UIColor whiteColor]];
[button.titleLabel setTextColor:[UIColor blackColor]];
[button addTarget:self action:@selector(load20More) forControlEvents:UIControlEventTouchUpInside];
[footerView addSubview:button];
[button release];
}
if ([songInfo count] > 20 && count < 100) {
return footerView;
}
else
return nil;
}
load more를 누르면 어떻게 될까요? – Cyprian
더로드하면 완벽하게 작동하며 tableView의 바닥 글 스크롤에 영향을 미치지 않습니다. –