I have a UITableViewCell with UISwitch as accessoryview of each cell. When I change the value of the switch in a cell, how can I know in which row the switch is? I need the row number in the switch value changed event.
UITableViewCellの選択色を変える場合はUITableViewCellのカスタムクラスを作成し、init内などで以下のような記述をするのが一般的だと思います。 UIView *selectedBackgroundView = [[UIView alloc] init]; selectedBackgroundView.backgroundColor = [UIColor yellowColor]; self.selectedBackgroundView = selectedBackgroundView; UIView *v = [[UIView alloc] initWithFrame:CGRectMake(40, 0, 1, 40)]; v.backgroundColor = [UIColor blackColor]; // ←selectedにしたときに黒い色が消えてしまう
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く