iPhone SDK簡単な質問
-
29-09-2019 - |
質問
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にサブビューを追加するか、独自のものを作成するかにかかわらず、必要なものをすべて提供する必要があります。
所属していません StackOverflow