Develop
2013.10.31 16:59
[ios] 배열(NSArray) 연산과 간단한 애니메이션(split images)
조회 수 45456 댓글 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 •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
741 | Develop |
[doc] mfc 매뉴얼 다운 받아서 완성하기.. ㅋㄷ
![]() |
hooni | 2013.04.23 | 7709 |
740 | System/OS |
[doc] TCP/IP 강의 자료 (html)
![]() |
hooni | 2013.04.23 | 11172 |
739 | Develop | [doc] UI개발시 유용한 소프트웨어 (개발 및 디버깅 툴) | hooni | 2013.04.23 | 12914 |
738 | System/OS |
[doc] 네트워크 장비와 라우터 설정 방법 발표 자료
![]() |
hooni | 2013.04.23 | 14496 |
737 | PPT |
[doc] 논문.. VoIP 관련.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 17082 |
736 | System/OS |
[doc] 레드햇 리눅스 메뉴얼 (html버전)
![]() |
hooni | 2013.04.23 | 10453 |
735 | PPT |
[doc] 발표 자료 ㅎㅎtalk4neo
![]() |
hooni | 2013.04.23 | 20994 |
734 | PPT |
[doc] 방송통신공학회 논문지(학술대회)
![]() |
hooni | 2013.04.23 | 13928 |
733 | Etc |
[doc] 웜 프레임워크 검증환경 구축(작성중..)
![]() |
hooni | 2013.04.23 | 16014 |
732 | PPT |
[doc] 위탁과제 제안서와 발표자료(pdf)
![]() |
hooni | 2013.04.23 | 12535 |
731 | Develop |
[doc] 유료 방송 제어 시스템 (CAS) 발표자료
![]() |
hooni | 2013.04.23 | 8512 |
730 | PPT |
[doc] 인공지능 관련 자료(채팅로봇도 포함..)
![]() |
hooni | 2013.04.23 | 18004 |