मैं अपने UITableView
में UITableViewCell
उपclassing कर रहा हूँ। मैं बार हजार एक के बारे में पहले यह किया है, लेकिन अब मैं इस प्रतिनिधि घटना को पकड़ने के लिए कोशिश कर रहा हूँ:UITableViewCell didselectrow ईवेंट देरी
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath;
जब सेल इस कॉलबैक छुआ है लागू किया जाना चाहिए। लेकिन मैंने केवल तभी आह्वान किया जब मैं छूने के बाद 6 सेकंड या 6 बार दबा रहा हूं, लेकिन हर स्पर्श नहीं।
tableview एक subclassed UIView
की एक subview है और मैं awakeFromNib
में इस फोन:
-(void)awakeFromNib{
_table_view.delegate = self;
_table_view.dataSource = self;
}
tableview ही ड्रॉ ठीक है, लेकिन इस घटना में अच्छी तरह से काम नहीं कर रहा। कोई विचार?
-(void) tableView:(UITableView*) tableView didHighlightRowAtIndexPath:(NSIndexPath*) indexPath
didSelect केवल आह्वान यदि आप वास्तव में एक सेल, बस टैप नहीं चयनित:
यहाँ UITableViewCell
उपवर्ग कोड मीटर
#import "FLBlockedPersonCell.h"
@implementation FLBlockedPersonCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
[super setHighlighted:highlighted animated:animated];
}
@end
ऐसा तब होता है जब सेल को 1 सेकंड के प्रेस के बाद हाइलाइट किया जाता है, जब मुझे सेल –
स्पर्श करता है तो shoudlHighlight के बारे में क्या होता है? –