2011-11-22 2 views
4

한 번은 쉽게 할 수있는 라이브러리를 보았습니다. UIActivityIndicatorView 쉽게 찾을 수 있지만 찾을 수 없습니다. 누군가는 좋은 방법을 알고 또 다른 방법을 알고 있습니다 UIActivityIndicatorView? something like that http://hpics.li/64d7b07예쁜 UIActivityIndicatorView 수행

+0

'좋은'은 무엇을 의미합니까? 너는 구체적 일 수 있니? ?! – Legolas

+0

@ 레골라스 예를 추가했습니다. – Keviin55

답변

10

체크 아웃

MBProgressHUD 나는 세부 레이블 작동 표시등이 정확히 무엇을 찾고 있는지 생각합니다.

+0

그게 내가 찾고 있던거야! 고맙습니다 – Keviin55

1

나는 이런 라이브러리에 대해 들어 본 적이 없지만 자신 만의 (임베디드 가능한 UIView로) 애니메이션을 만들고 애니메이션화하는 것은 너무 어렵지 않습니다.

어쩌면 애니메이션 GIF일까요? (related question linked here)

+0

아니요.하지만 도움이 될 수 있습니다. tahnk you – Keviin55

16

나는 지금도 비슷한 것을했습니다. 적절한 하위 클래스로 만들 겠지만, 지금은이 작업을 시작해야합니다. UILabel을 쉽게 추가 할 수 있습니다. 저는 ARC로 이것을하고 있습니다. 그래서 메모리 관리가 필요하다면 조심하십시오.

UIView *activityContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; 
activityContainer.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.25]; 
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake((self.view.frame.size.width/2) - 40, (self.view.frame.size.height/2) - 40, 80, 80)]; 
indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge; 
indicator.backgroundColor = [UIColor blackColor]; 
[indicator layer].cornerRadius = 8.0; 
[indicator layer].masksToBounds = YES; 
[activityContainer addSubview:indicator]; 
+0

간단하고 작동합니다. 감사합니다. –

1

UIActivity 하위 클래스로로드 할 수있는 사용자 지정 UIView (Loader Animation)를 만들었습니다.