본문 바로가기
옛날

테이블뷰 다음페이지 불러오기

by 차가운게 조아 2016. 9. 5.








willDisplayCell 


*코드 설명

- 파싱데이터 셀에 뿌려주는 형식이며 20개씩 불러오고 총 데이터가 20개 이상일  numberOfRowsInSection 카운트 +1 해준다. More 버튼을 넣기 위해서..


- 만약 More 버튼 없이 구현하기 위해서는 아래 데이터의 [getData count]를 [getData count] -1 로 해주면 된다. (다음 데이터가 없을 시 예외처리)


-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

    

    //다음 데이터 로드 

    if (indexPath.row == [getData count]) {

        

        pageNo++;

        [self setLatitude:longitude setLongitude:latitude];

        

    }

    

}







'옛날' 카테고리의 다른 글

iOS 개발 자료  (0) 2016.09.21
xcode table cell dynamic height(테이블뷰 동적높이)  (0) 2016.09.20
tableview row insert  (0) 2016.09.05
[ios] 자주 쓰는 패턴  (0) 2016.09.05
클래시로얄 무과금 유저  (0) 2016.08.04