scrollviewDelegate method를 선언해준뒤


 - (void)scrollViewDidEndDragging:(UIScrollView *)aScrollView

                  willDecelerate:(BOOL)decelerate

{

 

    if((int)aScrollView.tag == 1200){ // 데이터 불러올 테이블뷰 지정

     

    }else{


        CGPoint offset = aScrollView.contentOffset;

        CGRect bounds = aScrollView.bounds;

        CGSize size = aScrollView.contentSize;

        UIEdgeInsets inset = aScrollView.contentInset;

        float y = offset.y + bounds.size.height - inset.bottom;

        float h = size.height;

        

        float reload_distance = 50;

        if(y > h + reload_distance) {

            NSLog(@"load more rows");

       }

    }

}


'ios 개발' 카테고리의 다른 글

ios objective c tableview delegate method  (0) 2017.08.21
[ios] UItabbarController 관련 메서드  (0) 2017.07.12
[ios] plist 읽어오기 및 쓰기  (0) 2017.07.10
[arcjeen] 1. ios UILabel  (0) 2017.03.14

WRITTEN BY
arcjeen
ios 관련문의 slimforce@naver.com

,