早速質問です。UITableViewController
カスタムセパレーターを持つカスタムセルを持っています(のUIImageView
サブビューであるとしてcell.contentView
)。セルを選択しているときに、セパレーターを非表示にして、強調表示された背景に表示されないようにします。
私は次のような構造を使用しようとしていました:
self.separatorImageViewTop.frame = CGRectMake(-240, 0, 120, 2);
self.separatorImageViewTop.hidden = YES;
self.separatorImageViewTop.alpha = 0;
[self.separatorImageViewTop.frame removeFromSuperview]
この方法はそれぞれ機能していますが、セルが選択されていると、それぞれがカスタムセパレーターに点滅効果をもたらしています。この点滅効果を回避するにはどうすればよいですか?
私のコードは次から呼び出されます:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
しかし、私は以下で使用しようとしました:
-(NSIndexPath*)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
セルの実際の強調表示が UIImageView` の後に発生することを期待していますtableView:willSelectRowAtIndexPath: method, but the result are the same - still blinking effect of a disapearing
。
何か案は?