UIActionSheet의 clickButtonAtIndex 함수에서 UIActivityIndicator를 시작합니다. 여기 그러나, 버튼을 클릭하는 순간, UIActivityIndicator가 UIActionSheet과 함께 사라actionSheet가 닫히 자마자 UIActivityIndicator가 사라집니다.
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle: @"Cancel"
otherButtonTitles: @"Button1",
@"Button2", nil];
[actionSheet showFromRect: rect inView: view animated: YES];
아래에 주어진 코드
+(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
NSLog(@"AS Button Clicked %d",buttonIndex);
UIActivityIndicatorView *indicator=[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
indicator.frame=CGRectMake(10, 10, 56, 56);
[indicator startAnimating];
[[actionSheet superview] addSubview:indicator];
}
그리고 UIActionSheet를 시작하는 코드입니다.
무엇이 여기에 있습니까?
감사합니다. 그것은 개념에 의해 제거되었습니다. :) –
귀하의 질문에 대한 답변을 얻었다면 답을 수락하는 것을 잊지 마십시오. – rmaddy
나는 그것을 어떻게하는지 모른다. Stack Overflow의 사용자 인터페이스는 어리 석다. –