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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1137 | System/OS | [linux] 웹로그분석기(webalizer) 설치 & 팁 | hooni | 2003.04.23 | 14939 |
1136 | System/OS | [linux] 데스크탑환경(GNOME/KDE) 바꾸기.. | hooni | 2003.04.23 | 12170 |
1135 | System/OS | [linux] 센드메일 동적릴레이 설치 | hooni | 2003.04.23 | 15274 |
1134 | System/OS | HTTP 프로토콜 (브라우저와 웹서버 간의 통신) | hooni | 2003.04.23 | 48335 |
1133 | Database | [mysql] DB->Text, Text->DB 변환 | hooni | 2003.04.23 | 12203 |
1132 | System/OS | [windows] 패스워드를 잊어먹었을때.. | hooni | 2003.04.23 | 17342 |
1131 | System/OS | [bios] 시스템 부팅 도중 발생하는 비프음 | hooni | 2003.04.23 | 18220 |
1130 | System/OS | [unix] SUN Solaris 싱글모드.. ㅡ,.ㅡ; | hooni | 2003.04.23 | 12047 |
1129 | System/OS | [linux] ProFTPD 타임아웃 설정 | hooni | 2003.04.23 | 12890 |
1128 | Develop | [css] 스크롤바 안생기게 | hooni | 2003.04.23 | 9911 |
1127 | System/OS | [unix] 유닉스 csh에서 환경변수 등록 | hooni | 2003.04.23 | 11750 |
1126 | System/OS | [linux] 쉘 스크립트 (Shell Script) | hooni | 2003.04.23 | 12107 |