【发布时间】:2014-01-05 04:19:49
【问题描述】:
检查我的 UIView 是否已显示在屏幕上的最佳方法是什么。我有 UISplitViewController,我尝试在点击 tableViewCell 后在自定义 UIView 中显示详细信息。我想做的就是避免重复已经显示的视图,或者如果可能的话关闭当前并显示新的视图。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"did select row at index path %ld",(long)indexPath.row );
InvoiceDetailsVC *detailsVC = [[InvoiceDetailsVC alloc]initWithFrame:CGRectMake(321, 0,708, 709)];
//here I would like to check if my detailsVC has already been shown
//if not I would like to display in that way
[self.splitViewController.view addSubview:detailsVC];
}
感谢您的帮助 问候
【问题讨论】:
标签: ios objective-c ipad uiview didselectrowatindexpath