Develop
2013.10.31 16:59
[ios] 배열(NSArray) 연산과 간단한 애니메이션(split images)
조회 수 45497 댓글 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 |
[c] 싱글, 더블 링크리스트(linked list)로 만든 예제..
![]() |
hooni | 2003.04.23 | 6759 |
240 | Develop |
[js] 윈도우 시작버튼처럼 나오는 메뉴
![]() |
hooni | 2013.04.23 | 6756 |
239 | Develop | [c] 소켓주소 구조체에 대해.. | hooni | 2003.04.23 | 6754 |
238 | Develop | [js] 이벤트 핸들러(Event Handlers) | hooni | 2003.04.23 | 6747 |
237 | Develop | [js] 가운데 새창 뜨는 함수와 이벤트 | hooni | 2003.04.23 | 6739 |
236 | Develop |
[c] 서비스 거부 공격(DoS;Denial of Service) 간단 소스.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 6724 |
235 | Develop |
[php] 서버 이상 체크 해서 문자보내는 샘플소스..
![]() |
hooni | 2013.04.23 | 6711 |
234 | Develop |
[c++] 헤더, 소스 파일 분리해서 작성해본 테스트 소스
![]() |
hooni | 2013.04.23 | 6704 |
233 | Develop |
[java] 스윙(swing) 인터페이스 이용해서 만든 구구단.. ㅋㅋ
![]() |
hooni | 2003.04.23 | 6702 |
232 | Develop |
[c] alarm()함수 설명과 간단한 예제
![]() |
hooni | 2013.04.23 | 6701 |
231 | Develop |
[c] 컴파일러 선행처리기 따라하기..
![]() |
hooni | 2003.04.23 | 6698 |
230 | Develop |
[c++] 인라인 함수 설명과 예제..
![]() |
hooni | 2013.04.23 | 6661 |