[swift] NavigationController Push View Animation 효과주기


        //뷰초기화

    let certificationView = CertificationViewController.init();

        

  //네비게이션컨트롤러초기화

        let rootNavigation = UINavigationController(rootViewController:certificationView);

        

        rootNavigation.navigationBar.isHidden = true;


 //애니메이션효과 지정

        rootNavigation.modalTransitionStyle = .coverVertical;

        

        self.present(rootNavigation, animated: true, completion: nil)


        


팝업형식의뷰가 필요할때 애니메이션을 주고싶을때 사용

'swift 공부' 카테고리의 다른 글

TableView에 대한 고찰  (0) 2017.12.14
[arcjeen] 6. swift 구조체 클래스  (0) 2017.03.22
[arcjeen] 5. swift closure  (0) 2017.03.21
[arcjeen] 4. swift 함수  (0) 2017.03.21
[arcjeen] 3.swift Optional  (0) 2017.03.21

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

,


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

,





- (
void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

//셀 선택시 실행될 메서드

}


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

//셀 높이 설정


}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

//셀 갯수 설정

}


//

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    //custom cell define

        

        NSString *CellIdentifier = [NSString stringWithFormat:@"S%dR%da",(int)indexPath.section,(int)indexPath.row];

        //셀 구분자 설정

        RankListTableViewCell *cell = (RankListTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

        if(cell == nil){

            cell = [[RankListTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];

          //cell 컨텐츠 설정 

          

        }

    

        return cell;

    



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

,