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 | Etc | 양성/음성 오류에 대한 개념 | hooni | 2013.04.23 | 19892 |
1136 | Algorithm | 암호 알고리즘 및 프로토콜의 이해.. | hooni | 2013.04.23 | 17247 |
1135 | Develop | 알고리즘 성능분석 | hooni | 2014.06.24 | 3057 |
1134 | Develop | 알고리즘 성능 분석 기준 | hooni | 2014.06.24 | 2871 |
1133 | System/OS | 아파치(Apache) 인증사용(htaccess)으로 특정 디렉토리에 암호걸기 | hooni | 2013.04.23 | 13714 |
1132 | Etc | 아이폰의 터치스크린 정확도 | hooni | 2015.04.01 | 1500 |
1131 | Develop | 아이 훌레시 작업중 ㅋㅋ | hooni | 2013.08.09 | 0 |
1130 | Etc | 아두이노 관련 정보.. | hooni | 2013.04.23 | 21806 |
1129 | Etc | 스파이웨어(BHO) 탐지하는 방법.. | hooni | 2013.04.23 | 44455 |
1128 | Algorithm | 스터디 자료, 암호화에 대해서.. 나중에 볼 ppt.. | hooni | 2013.04.23 | 13426 |
1127 | Etc | 스마트폰 보안 해외 발생 사례~ | hooni | 2013.04.23 | 24991 |
1126 | Etc | 수리통계학 : 표본공간과 사상-1 | hooni | 2015.04.20 | 974 |