質問

uitableviewcellの左側にuiactivityindicatorViewを追加することは可能ですか?開示インジケーターには、uitableviewcellの右側を既に使用しています。

ありがとう。

役に立ちましたか?

解決

もちろん。 uiactivitivitivitivitydicatorViewをインスタンス化するだけで、必要な場所に設定するフレームを指定し、cell.contentViewのサブビューとして追加して、呼び出します startAnimating.

UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] 
    initWithFrame:CGRectMake(0,0,20,20)]; //or whatever--this will put it in the top left corner of the cell
[cell.contentView addSubview:spinner]
[spinner startAnimating];
[spinner release];

他のヒント

カスタムセルを作成すると、必要なことは何でもできます。だが この文書はAppleからです 通常の古いuitableviewcellにサブビューを追加するか、独自のものを作成するかにかかわらず、必要なものをすべて提供する必要があります。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top