
- (voID)tableVIEw:(UItableVIEw *)tableVIEw dIDdeselectRowAtIndexPath:(NSIndexPath *)indexPath{[self.tableVIEw deselectRowAtIndexPath:indexPath animated:NO];NewVIEwController *newVIEwController = [[NewVIEwController alloc] init];newVIEwController.theTitle = [self.tableVIEw cellForRowAtIndexPath:indexPath].textLabel.text;[self.navigationController pushVIEwController: newVIEwController animated:YES];} tableVIEw在vIEwDIDLoad方法中初始化.仍然当我单击一个单元格时,新的vIEwController被推入但单元格保持选中状态.这可能是什么问题?
解决方法 您已将代码放在dIDdeselectRowAtIndexPath中 – 将其放在dIDSelectRowAtIndexPath中.这是一个容易犯的错误,因为在dIDSelect之前,dIDdeselect出现在代码完成中. 总结以上是内存溢出为你收集整理的ios – deselectRowAtIndexPath问题全部内容,希望文章能够帮你解决ios – deselectRowAtIndexPath问题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)