기사를 읽는 앱을 만들고 있습니다. 나는 메뉴 목록에 AMSliderMenu (https://github.com/SocialObjects-Software/AMSlideMenu) 라이브러리를 사용하고 있습니다. 내가 그것을 데이터를로드 꽃밥보기에 있기 때문에 다른보기를로드하는 데 시간이 걸립니다 에서 테이블 셀에 AMSlideMenu을 클릭하면seague 수행 중 UIActivityIndicatorView 방법은 무엇입니까?
나는 UIActivityIndicator
를 구현 드릴 수 없습니다.
UIActivityIndicator
사용자가 UIActivityIndicator
셀을 클릭하면 다른보기를 열 때까지 수행하고 싶습니다.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.center = CGPointMake(160, 240);
spinner.hidesWhenStopped = YES;
[self.view addSubview:spinner];
[spinner startAnimating];
dispatch_queue_t downloadQueue = dispatch_queue_create("downloader", NULL);
dispatch_async(downloadQueue, ^{
[NSThread sleepForTimeInterval:10];
dispatch_async(dispatch_get_main_queue(), ^{
[spinner stopAnimating];
});
});
NSString *segueIdentifier = [self.mainVC segueIdentifierForIndexPathInLeftMenu:indexPath];
if (segueIdentifier && segueIdentifier.length > 0)
{
[self performSegueWithIdentifier:segueIdentifier sender:self];
}
}
은 무엇을 할 때 당신의 보도 셀됩니까? BTW, 고려 MBProgressHud https://github.com/jdg/MBProgressHUD. – kelin
왜 MBProgressHUD를 사용하지 않습니까? 그 중 하나가 최고 – sreekanthk