グループ化されたスタイルのUITableViewを含むiPhoneアプリがあります。ViewControllerで、UIActivityIndicatorViewをプロパティとして定義しました。
self.browsingIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
browsingIndicator.hidesWhenStopped = YES;
このスピナーをテーブルセクションヘッダーの1つに配置したいと思います。
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *sectionHeader = [[[UIView alloc] init] autorelease];
[sectionHeader addSubview:browsingIndicator];
browsingIndicator.center = CGPointMake(20, 30);
return sectionHeader;
}
これは機能しています。問題:デバイスの向きを変更すると、アクティビティインジケーターが消えて、表示されている画面からドラッグして元に戻した場合にのみ再表示されます。デバイスを元の向きに戻すと、「hidesWhenStopped」をNOに変更しても効果がありません。ない。
誰かが私を正しい方向に向けることができますか?ありがとう!