Cal*_*ron 1 iphone objective-c ipad ios
我有一个popover,显示一个包含几个单元格的tableview.触摸单元格时,它会调用以下代码:
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Cell check %@", [totalArray objectAtIndex:indexPath.row]);
[self dismissPopoverAnimated:YES];
}
Run Code Online (Sandbox Code Playgroud)
我知道这个方法被调用,因为NSLOG显示它应该的文本.问题是弹出窗口没有被解雇.我以为
[self dismissPopoverAnimated:YES];
Run Code Online (Sandbox Code Playgroud)
应该解雇popover?我究竟做错了什么?
你需要调用dismissPopoverAnimated:
你的popover,而不是你的视图或视图控制器.试着打电话[myPopover dismissPopoverAnimated:YES];
归档时间: |
|
查看次数: |
3030 次 |
最近记录: |