私の質問は、iPhone プロジェクトでのアクティビティ インジケーターの使用に関するものです。UIActivityIndicatorView を含むクラスがあります
@interface StatusView : UIView
{
UIActivityIndicatorView *indicator;
UILabel *textLabel;
}
- (id)initWithFrame:(CGRect)frame Text:(NSString*)text andShowIndicator:(BOOL)value;
ビジネス ロジック コードで [indicator startAnimating] を呼び出すと、画面の下部にフレームが表示されます。コードには、インジケーターを解放する dealloc メソッドも含まれています。
- (void)dealloc
{
[indicator release];
[super dealloc];
}
ほとんどの場合、インジケーターはうまく機能しますが、消えない場合がいくつかあります。
stopAnimating メソッドを常に明示的に呼び出す必要がありますか? リリースはそれを処理しますか?正しい使い方とは?