Develop
2013.10.31 16:59
[ios] 배열(NSArray) 연산과 간단한 애니메이션(split images)
조회 수 45585 댓글 0
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];
TAG •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
597 | Develop |
[php] gd 프로그램.. htm 파일.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 7468 |
596 | Develop | [c] 시간(요일,날짜 포함) 출력하는 프로그램 초간단 코드 | hooni | 2013.04.23 | 7424 |
595 | Develop |
[c#] 툴바 최근 버전(IE6, IE7 두가지 버전)
![]() |
hooni | 2013.04.23 | 2138 |
594 | Develop |
[c#] 툴바 현재 욜심히 만들고 있는거.. 백업용.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 2852 |
593 | Develop |
[c++] 중복실행 방지(Mutex;뮤텍스 ) 샘플 소스.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8768 |
592 | Develop |
[c#] HTML 이벤트 샘플 소스..
![]() |
hooni | 2013.04.23 | 7787 |
591 | Develop |
[c++] 압축프로그램(Lite Zip) 샘플
![]() |
hooni | 2013.04.23 | 8632 |
590 | Develop |
[c++] 데이터 압축 프로그램 소스 (lzw)
![]() |
hooni | 2013.04.23 | 9972 |
589 | Develop |
[c++] MFC로 만든 디렉토리/파일 파인더
![]() |
hooni | 2013.04.23 | 9367 |
588 | Develop | [c] 아파치 모듈(Apache Module) 만들기 | hooni | 2013.04.23 | 8627 |
587 | Develop |
[c++] 현승이가 준 메신저 소스.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8300 |
586 | Develop | [linux] 날짜나 파일의 내용으로 검색하는 방법(find 명령 사용) | hooni | 2013.04.23 | 8160 |