Develop
2013.10.31 16:59
[ios] 배열(NSArray) 연산과 간단한 애니메이션(split images)
조회 수 45495 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
241 | Develop |
[ios] 한샘 카달로그 앱 소스 (아이폰용)
![]() |
hooni | 2013.04.23 | 10922 |
240 | Develop | [c] 소수 구하기 #2 (입력한 숫자가 소수인지 판별하기..) | hooni | 2013.04.23 | 10994 |
239 | Develop |
[c] 네트워크 트래릭 모니터링.. 졸업작품..
2 ![]() |
hooni | 2013.04.23 | 11059 |
238 | Develop |
[자료구조] 트리(tree) 용어정리
![]() |
hooni | 2003.04.23 | 11094 |
237 | Develop |
[c++] SetWindowPos함수를 이용한 크기조절 예제
1 ![]() |
hooni | 2013.04.23 | 11101 |
236 | Develop |
[iphone] 파일 업로드 샘플 코드 ㅎㅎ
![]() |
hooni | 2013.04.23 | 11120 |
235 | Develop |
[c] 파일입출력, 링크리스트(linked list)를 이용한 주소록(도스용) 소스코드
1 ![]() |
hooni | 2003.04.23 | 11179 |
234 | Develop | [c] 최대공약수, 최소공배수, 서로소 구하기 (펌) | hooni | 2013.04.23 | 11194 |
233 | Develop | [c] 파일입출력 간단한 설명 | hooni | 2003.04.23 | 11262 |
232 | Develop | [switch] 시스코 스위치(catalyst 2950) telnet 설정 | hooni | 2013.04.23 | 11291 |
231 | Develop | [unix] 유닉스 명령에 메타문자 사용 | hooni | 2014.02.19 | 11296 |
230 | Develop | [ios] iOS In App Purchase 코드 부분 샘플 2 | hooni | 2013.11.20 | 11322 |