Contents

조회 수 45424 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
iconImages 배열과 charImages 배열을 합침
샘플코드 설명~
배열 앞/뒤 순서는 넌스에 따라 랜덤하게 적용하고 애니메이션 적용까지..

NSArray *iconImages = [NSArray arrayWithObjects:
    [UIImage imageNamed:@"00_splash_loding_icon_01"],
    [UIImage imageNamed:@"00_splash_loding_icon_02"],
    [UIImage imageNamed:@"00_splash_loding_icon_03"],
    [UIImage imageNamed:@"00_splash_loding_icon_04"],
    [UIImage imageNamed:@"00_splash_loding_icon_05"],
    [UIImage imageNamed:@"00_splash_loding_icon_06"],
    [UIImage imageNamed:@"00_splash_loding_icon_07"],
    [UIImage imageNamed:@"00_splash_loding_icon_08"],nil];

NSArray *charImages = [NSArray arrayWithObjects:
    [UIImage imageNamed:@"00_splash_loding_char_01"],
    [UIImage imageNamed:@"00_splash_loding_char_02"],
    [UIImage imageNamed:@"00_splash_loding_char_03"],
    [UIImage imageNamed:@"00_splash_loding_char_04"],
    [UIImage imageNamed:@"00_splash_loding_char_05"],
    [UIImage imageNamed:@"00_splash_loding_char_06"],nil];

NSArray *animationImages =
    (arc4random()%2 > 0)
     ? [iconImages arrayByAddingObjectsFromArray:charImages]
     : [charImages arrayByAddingObjectsFromArray:iconImages];

loadingActivityIndicator_ =
    [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 24, 24)]; // 34x35

loadingActivityIndicator_.animationDuration = 2.0;
loadingActivityIndicator_.animationRepeatCount = 0;
loadingActivityIndicator_.animationImages = animationImages;
loadingActivityIndicator_.contentMode = UIViewContentModeScaleAspectFit;
[loadingActivityIndicator_ setCenter:activityPt];
[containerView_ addSubview:loadingActivityIndicator_];

//애니메이션 시작
[loadingActivityIndicator_ startAnimating];

//애니메이션 정지
[loadingActivityIndicator_ stopAnimating];


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
805 Develop [android] ListView+ArrayAdapter 테스트 hooni 2013.04.23 43895
804 Develop [android] N-Puzzle 게임 file hooni 2015.07.09 857
803 Develop [android] SQLiteOpenHelper를 이용한 DBManager hooni 2017.06.14 2043
802 Develop [android] SurfaceView를 이용한 애니메이션 ㅎㅎ file hooni 2013.04.23 57700
801 Develop [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) hooni 2013.04.23 20419
800 Develop [android] 가속도 센서를 이용한 흔듦(Shake) 감지 file hooni 2014.11.04 1896
799 Develop [android] 간단한 SQLIite 예제 hooni 2017.06.14 1307
798 Develop [android] 개발 환경 세팅 따라하기 ㅋㅋ file hooni 2013.04.23 40394
797 Develop [android] 단일 Thread 환경의 안드로이드에서 Handler를 사용 file hooni 2013.04.23 26491
796 Develop [android] 디바이스(시뮬레이터) hosts 파일 수정하기 hooni 2013.04.23 31064
795 Develop [android] 딜레이를 구현하기 위한 꼼수 hooni 2016.11.24 926
794 Develop [android] 레이아웃 사이즈 변경 (동적; programmatically) hooni 2016.11.07 1472
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 71 Next
/ 71