首页 > 移动平台 > 详细

IOS TableView的Delegate Methods-tableView didSelectRowAtIndexPath

时间:2015-09-15 12:43:03      阅读:234      评论:0      收藏:0      [点我收藏+]

选中tableView的indexPath.row这一行

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

if (self.isFromChatView

self.chatViewController.phraseString = [self.phraseArray objectAtIndex:indexPath.row];

//else 

//self.newSMSViewController.messageString = [self.phraseArray objectAtIndex:indexPath.row];

 //去掉选中的背景,恢复原来的样子

[tableView deselectRowAtIndexPath:indexPath animated:YES];

[self dismissModalViewControllerAnimated:YES];

}

 

前提是选中一行,做如下操作:

去掉[tableView deselectRowAtIndexPath:indexPath animated:YES],效果如下:

技术分享

 

加上 [tableView deselectRowAtIndexPath:indexPath animated:YES],效果如下:

技术分享

IOS TableView的Delegate Methods-tableView didSelectRowAtIndexPath

原文:http://www.cnblogs.com/yuyu-2012/p/4809689.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!