0

I have used grouped UITAbleView for navigation. One of the cell directed to external link which opens safari and app goes to background.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.apple.com/]]

If i open the app again, it shows as table cell still selected. How to prevent this.

4

2 回答 2

1

尝试将此行添加到您的tableView:didSelectRowAtIndexPath:

[tableView deselectRowAtIndexPath:indexPath animated:YES];

于 2013-07-30T10:58:23.850 回答
1

当表格出现时,使控制器清除选择。在加载时添加以下代码行。

self.clearsSelectionOnViewWillAppear = YES;
于 2013-07-30T11:03:21.360 回答